@aws-amplify/core 6.0.1-api-v6-models.8035dfc.0 → 6.0.1-api-v6-models.3eb7748.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/lib/Cache/StorageCache.d.ts +14 -31
  2. package/lib/Cache/StorageCache.js +97 -102
  3. package/lib/Cache/StorageCache.native.d.ts +19 -0
  4. package/lib/Cache/StorageCache.native.js +164 -0
  5. package/{lib-esm/Cache/AsyncStorageCache.d.ts → lib/Cache/StorageCacheCommon.d.ts} +124 -99
  6. package/lib/Cache/{AsyncStorageCache.js → StorageCacheCommon.js} +494 -432
  7. package/lib/Cache/constants.d.ts +6 -0
  8. package/lib/Cache/constants.js +17 -0
  9. package/lib/Cache/index.d.ts +2 -0
  10. package/lib/Cache/index.js +7 -0
  11. package/lib/Cache/types/cache.d.ts +38 -0
  12. package/lib/Cache/types/index.d.ts +1 -1
  13. package/lib/Cache/types/index.js +1 -1
  14. package/lib/Cache/{Utils → utils}/CacheList.d.ts +1 -1
  15. package/lib/Cache/{Utils → utils}/CacheList.js +2 -1
  16. package/lib/Cache/utils/cacheHelpers.d.ts +14 -0
  17. package/lib/Cache/utils/cacheHelpers.js +51 -0
  18. package/lib/Cache/{Utils → utils}/errorHelpers.d.ts +0 -1
  19. package/lib/Cache/{Utils → utils}/errorHelpers.js +0 -4
  20. package/lib/Cache/utils/index.d.ts +2 -0
  21. package/lib/Cache/utils/index.js +12 -0
  22. package/lib/I18n/I18n.js +1 -6
  23. package/lib/Platform/types.d.ts +18 -8
  24. package/lib/Platform/types.js +10 -2
  25. package/lib/Platform/version.d.ts +1 -1
  26. package/lib/Platform/version.js +1 -1
  27. package/lib/Reachability/Reachability.d.ts +1 -0
  28. package/lib/Reachability/Reachability.js +42 -1
  29. package/lib/ServiceWorker/ServiceWorker.js +69 -17
  30. package/lib/ServiceWorker/index.d.ts +0 -12
  31. package/lib/ServiceWorker/index.js +0 -12
  32. package/lib/Signer/Signer.js +3 -2
  33. package/lib/awsClients/cognitoIdentity/base.js +2 -1
  34. package/lib/awsClients/pinpoint/base.js +2 -1
  35. package/lib/awsClients/pinpoint/getInAppMessages.js +2 -1
  36. package/lib/awsClients/pinpoint/putEvents.js +2 -1
  37. package/lib/awsClients/pinpoint/updateEndpoint.js +2 -1
  38. package/lib/clients/middleware/signing/signer/signatureV4/index.d.ts +0 -1
  39. package/lib/clients/middleware/signing/signer/signatureV4/index.js +0 -1
  40. package/lib/clients/middleware/signing/signer/signatureV4/presignUrl.js +2 -1
  41. package/lib/errors/errorHelpers.d.ts +2 -0
  42. package/lib/errors/errorHelpers.js +20 -0
  43. package/lib/errors/index.d.ts +1 -0
  44. package/lib/errors/index.js +3 -1
  45. package/lib/index.d.ts +4 -4
  46. package/lib/index.js +9 -6
  47. package/lib/libraryUtils.d.ts +8 -7
  48. package/lib/libraryUtils.js +17 -17
  49. package/lib/parseAWSExports.js +34 -19
  50. package/lib/providers/pinpoint/apis/flushEvents.d.ts +2 -2
  51. package/lib/providers/pinpoint/apis/record.d.ts +1 -1
  52. package/lib/providers/pinpoint/apis/record.js +8 -24
  53. package/lib/providers/pinpoint/apis/updateEndpoint.js +6 -6
  54. package/lib/providers/pinpoint/index.d.ts +2 -2
  55. package/lib/providers/pinpoint/index.js +4 -2
  56. package/lib/providers/pinpoint/types/errors.d.ts +9 -0
  57. package/lib/providers/pinpoint/types/errors.js +15 -0
  58. package/lib/providers/pinpoint/types/index.d.ts +1 -0
  59. package/lib/providers/pinpoint/types/index.js +3 -0
  60. package/lib/providers/pinpoint/types/pinpoint.d.ts +3 -3
  61. package/lib/providers/pinpoint/utils/index.d.ts +1 -0
  62. package/lib/providers/pinpoint/utils/index.js +3 -1
  63. package/lib/providers/pinpoint/utils/resolveEndpointId.d.ts +8 -0
  64. package/lib/providers/pinpoint/utils/resolveEndpointId.js +85 -0
  65. package/lib/singleton/Amplify.d.ts +2 -2
  66. package/lib/singleton/Amplify.js +6 -5
  67. package/lib/singleton/Auth/types.d.ts +3 -3
  68. package/lib/singleton/Cache/types.d.ts +18 -0
  69. package/lib/singleton/Cache/types.js +4 -0
  70. package/lib/singleton/Interactions/types.d.ts +21 -0
  71. package/lib/singleton/Interactions/types.js +4 -0
  72. package/lib/singleton/Notifications/PushNotification/types.d.ts +2 -0
  73. package/lib/singleton/Notifications/PushNotification/types.js +4 -0
  74. package/lib/singleton/Notifications/types.d.ts +3 -1
  75. package/lib/singleton/types.d.ts +3 -3
  76. package/lib/storage/CookieStorage.js +8 -5
  77. package/lib/storage/DefaultStorage.js +1 -1
  78. package/lib/storage/utils.d.ts +1 -1
  79. package/lib/storage/utils.js +3 -3
  80. package/lib/tsconfig.tsbuildinfo +1 -1
  81. package/lib/types/errors.d.ts +1 -0
  82. package/lib/types/errors.js +1 -0
  83. package/lib/utils/amplifyUrl/index.d.ts +13 -0
  84. package/lib/utils/amplifyUrl/index.js +10 -0
  85. package/lib/utils/amplifyUrl/polyfill.d.ts +0 -0
  86. package/lib/utils/amplifyUrl/polyfill.js +4 -0
  87. package/lib/utils/amplifyUrl/polyfill.native.d.ts +1 -0
  88. package/lib/utils/amplifyUuid/index.d.ts +3 -0
  89. package/lib/utils/amplifyUuid/index.js +9 -0
  90. package/lib/utils/amplifyUuid/polyfill.d.ts +0 -0
  91. package/lib/utils/amplifyUuid/polyfill.js +4 -0
  92. package/lib/utils/amplifyUuid/polyfill.native.d.ts +1 -0
  93. package/lib/utils/amplifyUuid/polyfill.native.js +6 -0
  94. package/lib/utils/deepFreeze.d.ts +1 -0
  95. package/lib/utils/deepFreeze.js +38 -0
  96. package/lib/{ClientDevice/android.d.ts → utils/getClientInfo/getClientInfo.android.d.ts} +1 -1
  97. package/lib/{ClientDevice/android.js → utils/getClientInfo/getClientInfo.android.js} +4 -4
  98. package/lib/{ClientDevice/browser.d.ts → utils/getClientInfo/getClientInfo.d.ts} +1 -9
  99. package/lib/{ClientDevice/ios.d.ts → utils/getClientInfo/getClientInfo.ios.d.ts} +1 -1
  100. package/lib/{ClientDevice/ios.js → utils/getClientInfo/getClientInfo.ios.js} +4 -4
  101. package/lib/{ClientDevice/browser.js → utils/getClientInfo/getClientInfo.js} +6 -18
  102. package/lib/utils/getClientInfo/index.d.ts +1 -0
  103. package/lib/utils/getClientInfo/index.js +7 -0
  104. package/lib/utils/index.d.ts +2 -0
  105. package/lib/utils/index.js +5 -1
  106. package/lib/utils/sessionListener/SessionListener.d.ts +10 -0
  107. package/lib/utils/sessionListener/SessionListener.js +55 -0
  108. package/lib/utils/sessionListener/SessionListener.native.d.ts +10 -0
  109. package/lib/utils/sessionListener/SessionListener.native.js +54 -0
  110. package/lib/utils/sessionListener/index.d.ts +2 -0
  111. package/lib/utils/sessionListener/index.js +7 -0
  112. package/lib/utils/sessionListener/types.d.ts +6 -0
  113. package/lib/utils/sessionListener/types.js +4 -0
  114. package/lib-esm/Cache/StorageCache.d.ts +14 -31
  115. package/lib-esm/Cache/StorageCache.js +97 -102
  116. package/lib-esm/Cache/StorageCache.native.d.ts +19 -0
  117. package/lib-esm/Cache/StorageCache.native.js +161 -0
  118. package/{lib/Cache/AsyncStorageCache.d.ts → lib-esm/Cache/StorageCacheCommon.d.ts} +124 -99
  119. package/lib-esm/Cache/{AsyncStorageCache.js → StorageCacheCommon.js} +493 -430
  120. package/lib-esm/Cache/constants.d.ts +6 -0
  121. package/lib-esm/Cache/constants.js +14 -0
  122. package/lib-esm/Cache/index.d.ts +2 -0
  123. package/lib-esm/Cache/index.js +4 -0
  124. package/lib-esm/Cache/types/cache.d.ts +38 -0
  125. package/lib-esm/Cache/types/index.d.ts +1 -1
  126. package/lib-esm/Cache/types/index.js +1 -1
  127. package/lib-esm/Cache/{Utils → utils}/CacheList.d.ts +1 -1
  128. package/lib-esm/Cache/{Utils → utils}/CacheList.js +1 -1
  129. package/lib-esm/Cache/utils/cacheHelpers.d.ts +14 -0
  130. package/lib-esm/Cache/utils/cacheHelpers.js +44 -0
  131. package/lib-esm/Cache/{Utils → utils}/errorHelpers.d.ts +0 -1
  132. package/lib-esm/Cache/{Utils → utils}/errorHelpers.js +0 -4
  133. package/lib-esm/Cache/utils/index.d.ts +2 -0
  134. package/lib-esm/Cache/utils/index.js +4 -0
  135. package/lib-esm/I18n/I18n.js +1 -6
  136. package/lib-esm/Platform/types.d.ts +18 -8
  137. package/lib-esm/Platform/types.js +10 -2
  138. package/lib-esm/Platform/version.d.ts +1 -1
  139. package/lib-esm/Platform/version.js +1 -1
  140. package/lib-esm/Reachability/Reachability.d.ts +1 -0
  141. package/lib-esm/Reachability/Reachability.js +43 -2
  142. package/lib-esm/ServiceWorker/ServiceWorker.js +69 -17
  143. package/lib-esm/ServiceWorker/index.d.ts +0 -12
  144. package/lib-esm/ServiceWorker/index.js +0 -12
  145. package/lib-esm/Signer/Signer.js +3 -2
  146. package/lib-esm/awsClients/cognitoIdentity/base.js +2 -1
  147. package/lib-esm/awsClients/pinpoint/base.js +2 -1
  148. package/lib-esm/awsClients/pinpoint/getInAppMessages.js +2 -1
  149. package/lib-esm/awsClients/pinpoint/putEvents.js +2 -1
  150. package/lib-esm/awsClients/pinpoint/updateEndpoint.js +2 -1
  151. package/lib-esm/clients/middleware/signing/signer/signatureV4/index.d.ts +0 -1
  152. package/lib-esm/clients/middleware/signing/signer/signatureV4/index.js +0 -1
  153. package/lib-esm/clients/middleware/signing/signer/signatureV4/presignUrl.js +2 -1
  154. package/lib-esm/errors/errorHelpers.d.ts +2 -0
  155. package/lib-esm/errors/errorHelpers.js +17 -0
  156. package/lib-esm/errors/index.d.ts +1 -0
  157. package/lib-esm/errors/index.js +1 -0
  158. package/lib-esm/index.d.ts +4 -4
  159. package/lib-esm/index.js +5 -4
  160. package/lib-esm/libraryUtils.d.ts +8 -7
  161. package/lib-esm/libraryUtils.js +7 -7
  162. package/lib-esm/parseAWSExports.js +34 -19
  163. package/lib-esm/providers/pinpoint/apis/flushEvents.d.ts +2 -2
  164. package/lib-esm/providers/pinpoint/apis/record.d.ts +1 -1
  165. package/lib-esm/providers/pinpoint/apis/record.js +9 -25
  166. package/lib-esm/providers/pinpoint/apis/updateEndpoint.js +6 -6
  167. package/lib-esm/providers/pinpoint/index.d.ts +2 -2
  168. package/lib-esm/providers/pinpoint/index.js +2 -1
  169. package/lib-esm/providers/pinpoint/types/errors.d.ts +9 -0
  170. package/lib-esm/providers/pinpoint/types/errors.js +12 -0
  171. package/lib-esm/providers/pinpoint/types/index.d.ts +1 -0
  172. package/lib-esm/providers/pinpoint/types/index.js +1 -0
  173. package/lib-esm/providers/pinpoint/types/pinpoint.d.ts +3 -3
  174. package/lib-esm/providers/pinpoint/utils/index.d.ts +1 -0
  175. package/lib-esm/providers/pinpoint/utils/index.js +1 -0
  176. package/lib-esm/providers/pinpoint/utils/resolveEndpointId.d.ts +8 -0
  177. package/lib-esm/providers/pinpoint/utils/resolveEndpointId.js +81 -0
  178. package/lib-esm/singleton/Amplify.d.ts +2 -2
  179. package/lib-esm/singleton/Amplify.js +6 -5
  180. package/lib-esm/singleton/Auth/types.d.ts +3 -3
  181. package/lib-esm/singleton/Cache/types.d.ts +18 -0
  182. package/lib-esm/singleton/Cache/types.js +3 -0
  183. package/lib-esm/singleton/Interactions/types.d.ts +21 -0
  184. package/lib-esm/singleton/Interactions/types.js +3 -0
  185. package/lib-esm/singleton/Notifications/PushNotification/types.d.ts +2 -0
  186. package/lib-esm/singleton/Notifications/PushNotification/types.js +3 -0
  187. package/lib-esm/singleton/Notifications/types.d.ts +3 -1
  188. package/lib-esm/singleton/types.d.ts +3 -3
  189. package/lib-esm/storage/CookieStorage.js +5 -5
  190. package/lib-esm/storage/DefaultStorage.js +2 -2
  191. package/lib-esm/storage/utils.d.ts +1 -1
  192. package/lib-esm/storage/utils.js +1 -1
  193. package/lib-esm/tsconfig.tsbuildinfo +1 -1
  194. package/lib-esm/types/errors.d.ts +1 -0
  195. package/lib-esm/types/errors.js +1 -0
  196. package/lib-esm/utils/amplifyUrl/index.d.ts +13 -0
  197. package/lib-esm/utils/amplifyUrl/index.js +6 -0
  198. package/lib-esm/utils/amplifyUuid/index.d.ts +3 -0
  199. package/lib-esm/utils/amplifyUuid/index.js +6 -0
  200. package/lib-esm/utils/amplifyUuid/polyfill.native.js +4 -0
  201. package/lib-esm/utils/deepFreeze.d.ts +1 -0
  202. package/lib-esm/utils/deepFreeze.js +34 -0
  203. package/lib-esm/{ClientDevice/android.d.ts → utils/getClientInfo/getClientInfo.android.d.ts} +1 -1
  204. package/lib-esm/{ClientDevice/android.js → utils/getClientInfo/getClientInfo.android.js} +2 -2
  205. package/lib-esm/{ClientDevice/browser.d.ts → utils/getClientInfo/getClientInfo.d.ts} +1 -9
  206. package/lib-esm/{ClientDevice/ios.d.ts → utils/getClientInfo/getClientInfo.ios.d.ts} +1 -1
  207. package/lib-esm/{ClientDevice/ios.js → utils/getClientInfo/getClientInfo.ios.js} +2 -2
  208. package/lib-esm/{ClientDevice/browser.js → utils/getClientInfo/getClientInfo.js} +4 -14
  209. package/lib-esm/utils/getClientInfo/index.d.ts +1 -0
  210. package/lib-esm/utils/getClientInfo/index.js +3 -0
  211. package/lib-esm/utils/index.d.ts +2 -0
  212. package/lib-esm/utils/index.js +2 -0
  213. package/lib-esm/utils/sessionListener/SessionListener.d.ts +10 -0
  214. package/lib-esm/utils/sessionListener/SessionListener.js +52 -0
  215. package/lib-esm/utils/sessionListener/SessionListener.native.d.ts +10 -0
  216. package/lib-esm/utils/sessionListener/SessionListener.native.js +51 -0
  217. package/lib-esm/utils/sessionListener/index.d.ts +2 -0
  218. package/lib-esm/utils/sessionListener/index.js +4 -0
  219. package/lib-esm/utils/sessionListener/types.d.ts +6 -0
  220. package/lib-esm/utils/sessionListener/types.js +3 -0
  221. package/package.json +9 -19
  222. package/src/Cache/StorageCache.native.ts +65 -0
  223. package/src/Cache/StorageCache.ts +61 -158
  224. package/src/Cache/StorageCacheCommon.ts +577 -0
  225. package/src/Cache/constants.ts +18 -0
  226. package/src/Cache/index.ts +6 -0
  227. package/src/Cache/types/cache.ts +51 -0
  228. package/src/Cache/types/index.ts +4 -4
  229. package/src/Cache/{Utils → utils}/CacheList.ts +185 -185
  230. package/src/Cache/utils/cacheHelpers.ts +52 -0
  231. package/src/Cache/{Utils → utils}/errorHelpers.ts +0 -4
  232. package/src/Cache/{Utils → utils}/index.ts +4 -5
  233. package/src/I18n/I18n.ts +1 -6
  234. package/src/Platform/types.ts +20 -11
  235. package/src/Platform/version.ts +1 -1
  236. package/src/Reachability/Reachability.ts +22 -2
  237. package/src/ServiceWorker/ServiceWorker.ts +20 -17
  238. package/src/ServiceWorker/index.ts +0 -12
  239. package/src/Signer/Signer.ts +3 -2
  240. package/src/awsClients/cognitoIdentity/base.ts +4 -1
  241. package/src/awsClients/pinpoint/base.ts +2 -1
  242. package/src/awsClients/pinpoint/getInAppMessages.ts +2 -1
  243. package/src/awsClients/pinpoint/putEvents.ts +2 -1
  244. package/src/awsClients/pinpoint/updateEndpoint.ts +2 -1
  245. package/src/clients/middleware/signing/signer/signatureV4/index.ts +0 -2
  246. package/src/clients/middleware/signing/signer/signatureV4/presignUrl.ts +2 -1
  247. package/src/errors/errorHelpers.ts +20 -0
  248. package/src/errors/index.ts +1 -0
  249. package/src/index.ts +8 -4
  250. package/src/libraryUtils.ts +17 -11
  251. package/src/parseAWSExports.ts +28 -9
  252. package/src/providers/pinpoint/apis/flushEvents.ts +2 -2
  253. package/src/providers/pinpoint/apis/record.ts +14 -28
  254. package/src/providers/pinpoint/apis/updateEndpoint.ts +6 -6
  255. package/src/providers/pinpoint/index.ts +6 -2
  256. package/src/providers/pinpoint/types/errors.ts +12 -0
  257. package/src/providers/pinpoint/types/index.ts +1 -0
  258. package/src/providers/pinpoint/types/pinpoint.ts +3 -2
  259. package/src/providers/pinpoint/utils/index.ts +1 -0
  260. package/src/providers/pinpoint/utils/resolveEndpointId.ts +46 -0
  261. package/src/singleton/Amplify.ts +10 -8
  262. package/src/singleton/Auth/types.ts +3 -3
  263. package/src/singleton/Cache/types.ts +27 -0
  264. package/src/singleton/Interactions/types.ts +29 -0
  265. package/src/singleton/Notifications/PushNotification/types.ts +6 -0
  266. package/src/singleton/Notifications/types.ts +3 -1
  267. package/src/singleton/types.ts +3 -5
  268. package/src/storage/CookieStorage.ts +5 -9
  269. package/src/storage/DefaultStorage.ts +2 -2
  270. package/src/storage/utils.ts +1 -1
  271. package/src/types/errors.ts +1 -0
  272. package/src/utils/amplifyUrl/index.ts +9 -0
  273. package/src/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.ts → utils/amplifyUrl/polyfill.native.ts} +1 -0
  274. package/src/utils/amplifyUuid/index.ts +9 -0
  275. package/src/utils/amplifyUuid/polyfill.native.ts +6 -0
  276. package/src/utils/amplifyUuid/polyfill.ts +4 -0
  277. package/src/utils/deepFreeze.ts +16 -0
  278. package/src/{ClientDevice/android.ts → utils/getClientInfo/getClientInfo.android.ts} +2 -2
  279. package/src/{ClientDevice/ios.ts → utils/getClientInfo/getClientInfo.ios.ts} +3 -3
  280. package/src/{ClientDevice/browser.ts → utils/getClientInfo/getClientInfo.ts} +4 -16
  281. package/src/utils/getClientInfo/index.ts +4 -0
  282. package/src/utils/index.ts +2 -0
  283. package/src/utils/sessionListener/SessionListener.native.ts +70 -0
  284. package/src/utils/sessionListener/SessionListener.ts +74 -0
  285. package/src/utils/sessionListener/index.ts +6 -0
  286. package/src/utils/sessionListener/types.ts +11 -0
  287. package/lib/Amplify.d.ts +0 -29
  288. package/lib/Amplify.js +0 -118
  289. package/lib/Cache/BrowserStorageCache.d.ts +0 -166
  290. package/lib/Cache/BrowserStorageCache.js +0 -456
  291. package/lib/Cache/InMemoryCache.d.ts +0 -129
  292. package/lib/Cache/InMemoryCache.js +0 -342
  293. package/lib/Cache/Utils/CacheUtils.d.ts +0 -25
  294. package/lib/Cache/Utils/CacheUtils.js +0 -86
  295. package/lib/Cache/Utils/index.d.ts +0 -2
  296. package/lib/Cache/Utils/index.js +0 -16
  297. package/lib/Cache/reactnative.d.ts +0 -3
  298. package/lib/Cache/reactnative.js +0 -8
  299. package/lib/Cache/types/Cache.d.ts +0 -55
  300. package/lib/ClientDevice/index.d.ts +0 -23
  301. package/lib/ClientDevice/index.js +0 -18
  302. package/lib/ClientDevice/reactnative.d.ts +0 -7
  303. package/lib/ClientDevice/reactnative.js +0 -24
  304. package/lib-esm/Amplify.d.ts +0 -29
  305. package/lib-esm/Amplify.js +0 -115
  306. package/lib-esm/Cache/BrowserStorageCache.d.ts +0 -166
  307. package/lib-esm/Cache/BrowserStorageCache.js +0 -453
  308. package/lib-esm/Cache/InMemoryCache.d.ts +0 -129
  309. package/lib-esm/Cache/InMemoryCache.js +0 -339
  310. package/lib-esm/Cache/Utils/CacheUtils.d.ts +0 -25
  311. package/lib-esm/Cache/Utils/CacheUtils.js +0 -79
  312. package/lib-esm/Cache/Utils/index.d.ts +0 -2
  313. package/lib-esm/Cache/Utils/index.js +0 -4
  314. package/lib-esm/Cache/reactnative.d.ts +0 -3
  315. package/lib-esm/Cache/reactnative.js +0 -6
  316. package/lib-esm/Cache/types/Cache.d.ts +0 -55
  317. package/lib-esm/ClientDevice/index.d.ts +0 -23
  318. package/lib-esm/ClientDevice/index.js +0 -15
  319. package/lib-esm/ClientDevice/reactnative.d.ts +0 -7
  320. package/lib-esm/ClientDevice/reactnative.js +0 -21
  321. package/src/Amplify.ts +0 -106
  322. package/src/Cache/AsyncStorageCache.ts +0 -495
  323. package/src/Cache/BrowserStorageCache.ts +0 -504
  324. package/src/Cache/CHANGELOG.md +0 -1239
  325. package/src/Cache/InMemoryCache.ts +0 -347
  326. package/src/Cache/Utils/CacheUtils.ts +0 -90
  327. package/src/Cache/reactnative.ts +0 -9
  328. package/src/Cache/types/Cache.ts +0 -75
  329. package/src/ClientDevice/index.ts +0 -14
  330. package/src/ClientDevice/reactnative.ts +0 -18
  331. package/lib/Cache/types/{Cache.js → cache.js} +0 -0
  332. package/lib/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.js → utils/amplifyUrl/polyfill.native.js} +1 -1
  333. /package/lib-esm/Cache/types/{Cache.js → cache.js} +0 -0
  334. /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.d.ts → utils/amplifyUrl/polyfill.d.ts} +0 -0
  335. /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.js → utils/amplifyUrl/polyfill.js} +0 -0
  336. /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.d.ts → utils/amplifyUrl/polyfill.native.d.ts} +0 -0
  337. /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.js → utils/amplifyUrl/polyfill.native.js} +0 -0
  338. /package/{lib/clients/middleware/signing/signer/signatureV4/polyfills/index.d.ts → lib-esm/utils/amplifyUuid/polyfill.d.ts} +0 -0
  339. /package/{lib/clients/middleware/signing/signer/signatureV4/polyfills/index.js → lib-esm/utils/amplifyUuid/polyfill.js} +0 -0
  340. /package/{lib/clients/middleware/signing/signer/signatureV4/polyfills/index.native.d.ts → lib-esm/utils/amplifyUuid/polyfill.native.d.ts} +0 -0
  341. /package/src/{clients/middleware/signing/signer/signatureV4/polyfills/index.ts → utils/amplifyUrl/polyfill.ts} +0 -0
@@ -45,11 +45,12 @@ var extendedEncodeURIComponent_1 = require("../../clients/middleware/signing/uti
45
45
  var serde_1 = require("../../clients/serde");
46
46
  var base_1 = require("./base");
47
47
  var errorHelpers_1 = require("./errorHelpers");
48
+ var amplifyUrl_1 = require("../../utils/amplifyUrl");
48
49
  var putEventsSerializer = function (_a, endpoint) {
49
50
  var ApplicationId = _a.ApplicationId, EventsRequest = _a.EventsRequest;
50
51
  (0, errorHelpers_1.assert)(!!ApplicationId, errorHelpers_1.PinpointValidationErrorCode.NoAppId);
51
52
  var headers = (0, base_1.getSharedHeaders)();
52
- var url = new URL(endpoint.url);
53
+ var url = new amplifyUrl_1.AmplifyUrl(endpoint.url);
53
54
  url.pathname = "v1/apps/".concat((0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(ApplicationId), "/events");
54
55
  var body = JSON.stringify(EventsRequest !== null && EventsRequest !== void 0 ? EventsRequest : {});
55
56
  return { method: 'POST', headers: headers, url: url, body: body };
@@ -44,10 +44,11 @@ var composeServiceApi_1 = require("../../clients/internal/composeServiceApi");
44
44
  var extendedEncodeURIComponent_1 = require("../../clients/middleware/signing/utils/extendedEncodeURIComponent");
45
45
  var serde_1 = require("../../clients/serde");
46
46
  var base_1 = require("./base");
47
+ var amplifyUrl_1 = require("../../utils/amplifyUrl");
47
48
  var updateEndpointSerializer = function (_a, endpoint) {
48
49
  var _b = _a.ApplicationId, ApplicationId = _b === void 0 ? '' : _b, _c = _a.EndpointId, EndpointId = _c === void 0 ? '' : _c, EndpointRequest = _a.EndpointRequest;
49
50
  var headers = (0, base_1.getSharedHeaders)();
50
- var url = new URL(endpoint.url);
51
+ var url = new amplifyUrl_1.AmplifyUrl(endpoint.url);
51
52
  url.pathname = "v1/apps/".concat((0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(ApplicationId), "/endpoints/").concat((0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(EndpointId));
52
53
  var body = JSON.stringify(EndpointRequest);
53
54
  return { method: 'PUT', headers: headers, url: url, body: body };
@@ -1,4 +1,3 @@
1
- import './polyfills';
2
1
  export { signRequest } from './signRequest';
3
2
  export { presignUrl } from './presignUrl';
4
3
  export { TOKEN_QUERY_PARAM } from './constants';
@@ -3,7 +3,6 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getHashedPayload = exports.TOKEN_QUERY_PARAM = exports.presignUrl = exports.signRequest = void 0;
6
- require("./polyfills");
7
6
  // TODO: V6 replace Signer
8
7
  var signRequest_1 = require("./signRequest");
9
8
  Object.defineProperty(exports, "signRequest", { enumerable: true, get: function () { return signRequest_1.signRequest; } });
@@ -44,6 +44,7 @@ exports.presignUrl = void 0;
44
44
  var constants_1 = require("./constants");
45
45
  var getSigningValues_1 = require("./utils/getSigningValues");
46
46
  var getSignature_1 = require("./utils/getSignature");
47
+ var amplifyUrl_1 = require("../../../../../utils/amplifyUrl");
47
48
  /**
48
49
  * Given a `Presignable` object, returns a Signature Version 4 presigned `URL` object.
49
50
  *
@@ -59,7 +60,7 @@ var presignUrl = function (_a, _b) {
59
60
  var accessKeyId = signingValues.accessKeyId, credentialScope = signingValues.credentialScope, longDate = signingValues.longDate, sessionToken = signingValues.sessionToken;
60
61
  // create the request to sign
61
62
  // @ts-ignore URL constructor accepts a URL object
62
- var presignedUrl = new URL(url);
63
+ var presignedUrl = new amplifyUrl_1.AmplifyUrl(url);
63
64
  Object.entries(__assign(__assign((_c = {}, _c[constants_1.ALGORITHM_QUERY_PARAM] = constants_1.SHA256_ALGORITHM_IDENTIFIER, _c[constants_1.CREDENTIAL_QUERY_PARAM] = "".concat(accessKeyId, "/").concat(credentialScope), _c[constants_1.AMZ_DATE_QUERY_PARAM] = longDate, _c[constants_1.SIGNED_HEADERS_QUERY_PARAM] = constants_1.HOST_HEADER, _c), (expiration && (_d = {}, _d[constants_1.EXPIRES_QUERY_PARAM] = expiration.toString(), _d))), (sessionToken && (_e = {}, _e[constants_1.TOKEN_QUERY_PARAM] = sessionToken, _e)))).forEach(function (_a) {
64
65
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
65
66
  presignedUrl.searchParams.append(key, value);
@@ -0,0 +1,2 @@
1
+ import { AmplifyErrorCode, AssertionFunction } from '../types';
2
+ export declare const assert: AssertionFunction<AmplifyErrorCode>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ var _a;
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.assert = void 0;
7
+ var createAssertionFunction_1 = require("./createAssertionFunction");
8
+ var types_1 = require("../types");
9
+ var amplifyErrorMap = (_a = {},
10
+ _a[types_1.AmplifyErrorCode.NoEndpointId] = {
11
+ message: 'Endpoint ID was not found and was unable to be created.',
12
+ },
13
+ _a[types_1.AmplifyErrorCode.PlatformNotSupported] = {
14
+ message: 'Function not supported on current platform.',
15
+ },
16
+ _a[types_1.AmplifyErrorCode.Unknown] = {
17
+ message: 'An unknown error occurred.',
18
+ },
19
+ _a);
20
+ exports.assert = (0, createAssertionFunction_1.createAssertionFunction)(amplifyErrorMap);
@@ -1,3 +1,4 @@
1
1
  export { AmplifyError } from './AmplifyError';
2
2
  export { createAssertionFunction } from './createAssertionFunction';
3
3
  export { PlatformNotSupportedError } from './PlatformNotSupportedError';
4
+ export { assert } from './errorHelpers';
@@ -2,10 +2,12 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.PlatformNotSupportedError = exports.createAssertionFunction = exports.AmplifyError = void 0;
5
+ exports.assert = exports.PlatformNotSupportedError = exports.createAssertionFunction = exports.AmplifyError = void 0;
6
6
  var AmplifyError_1 = require("./AmplifyError");
7
7
  Object.defineProperty(exports, "AmplifyError", { enumerable: true, get: function () { return AmplifyError_1.AmplifyError; } });
8
8
  var createAssertionFunction_1 = require("./createAssertionFunction");
9
9
  Object.defineProperty(exports, "createAssertionFunction", { enumerable: true, get: function () { return createAssertionFunction_1.createAssertionFunction; } });
10
10
  var PlatformNotSupportedError_1 = require("./PlatformNotSupportedError");
11
11
  Object.defineProperty(exports, "PlatformNotSupportedError", { enumerable: true, get: function () { return PlatformNotSupportedError_1.PlatformNotSupportedError; } });
12
+ var errorHelpers_1 = require("./errorHelpers");
13
+ Object.defineProperty(exports, "assert", { enumerable: true, get: function () { return errorHelpers_1.assert; } });
package/lib/index.d.ts CHANGED
@@ -7,8 +7,8 @@ export { getCredentialsForIdentity, getId, GetCredentialsForIdentityInput, GetCr
7
7
  export { UserProfile } from './types';
8
8
  export { CookieStorage, defaultStorage, sessionStorage, sharedInMemoryStorage, } from './storage';
9
9
  export { KeyValueStorageInterface } from './types';
10
- import { BrowserStorageCache } from './Cache/BrowserStorageCache';
11
- export { InMemoryCache } from './Cache/InMemoryCache';
12
- export { BrowserStorageCache };
13
- export { BrowserStorageCache as Cache };
10
+ export { Cache } from './Cache';
11
+ export { CacheConfig } from './Cache/types';
14
12
  export { I18n } from './I18n';
13
+ export { ConsoleLogger } from './Logger';
14
+ export { ServiceWorker } from './ServiceWorker';
package/lib/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.I18n = exports.Cache = exports.BrowserStorageCache = exports.InMemoryCache = exports.sharedInMemoryStorage = exports.sessionStorage = exports.defaultStorage = exports.CookieStorage = exports.getId = exports.getCredentialsForIdentity = exports.clearCredentials = exports.AmplifyClassV6 = exports.fetchAuthSession = exports.Amplify = exports.Hub = void 0;
5
+ exports.ServiceWorker = exports.ConsoleLogger = exports.I18n = exports.Cache = exports.sharedInMemoryStorage = exports.sessionStorage = exports.defaultStorage = exports.CookieStorage = exports.getId = exports.getCredentialsForIdentity = exports.clearCredentials = exports.AmplifyClassV6 = exports.fetchAuthSession = exports.Amplify = exports.Hub = void 0;
6
6
  /*
7
7
  This file maps top-level exports from `@aws-amplify/core`. These are intended to be potentially customer-facing exports.
8
8
  */
@@ -25,11 +25,14 @@ Object.defineProperty(exports, "defaultStorage", { enumerable: true, get: functi
25
25
  Object.defineProperty(exports, "sessionStorage", { enumerable: true, get: function () { return storage_1.sessionStorage; } });
26
26
  Object.defineProperty(exports, "sharedInMemoryStorage", { enumerable: true, get: function () { return storage_1.sharedInMemoryStorage; } });
27
27
  // Cache exports
28
- var BrowserStorageCache_1 = require("./Cache/BrowserStorageCache");
29
- Object.defineProperty(exports, "BrowserStorageCache", { enumerable: true, get: function () { return BrowserStorageCache_1.BrowserStorageCache; } });
30
- Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { return BrowserStorageCache_1.BrowserStorageCache; } });
31
- var InMemoryCache_1 = require("./Cache/InMemoryCache");
32
- Object.defineProperty(exports, "InMemoryCache", { enumerable: true, get: function () { return InMemoryCache_1.InMemoryCache; } });
28
+ var Cache_1 = require("./Cache");
29
+ Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { return Cache_1.Cache; } });
33
30
  // Internationalization utilities
34
31
  var I18n_1 = require("./I18n");
35
32
  Object.defineProperty(exports, "I18n", { enumerable: true, get: function () { return I18n_1.I18n; } });
33
+ // Logging utilities
34
+ var Logger_1 = require("./Logger");
35
+ Object.defineProperty(exports, "ConsoleLogger", { enumerable: true, get: function () { return Logger_1.ConsoleLogger; } });
36
+ // Service worker
37
+ var ServiceWorker_1 = require("./ServiceWorker");
38
+ Object.defineProperty(exports, "ServiceWorker", { enumerable: true, get: function () { return ServiceWorker_1.ServiceWorker; } });
@@ -1,25 +1,26 @@
1
1
  export { generateRandomString, isBrowser, isNonRetryableError, isWebWorker, jitteredBackoff, jitteredExponentialRetry, NonRetryableError, retry, urlSafeDecode, urlSafeEncode, } from './utils';
2
2
  export { parseAWSExports } from './parseAWSExports';
3
3
  export { LegacyConfig } from './singleton/types';
4
+ export { amplifyUuid } from './utils/amplifyUuid';
5
+ export { AmplifyUrl, AmplifyUrlSearchParams } from './utils/amplifyUrl';
4
6
  export { decodeJWT, assertTokenProviderConfig, assertIdentityPoolIdConfig, assertOAuthConfig, } from './singleton/Auth/utils';
5
7
  export { isTokenExpired } from './singleton/Auth';
6
8
  export { GraphQLAuthMode, DocumentType } from './singleton/API/types';
7
9
  export { Signer } from './Signer';
8
- export { JWT, StrictUnion, CognitoIdentityPoolConfig, JwtPayload, AuthStandardAttributeKey, AuthVerifiableAttributeKey, } from './singleton/Auth/types';
9
- export { ConsoleLogger, ConsoleLogger as Logger } from './Logger';
10
- export { ClientDevice } from './ClientDevice';
10
+ export { JWT, StrictUnion, CognitoIdentityPoolConfig, JwtPayload, AuthStandardAttributeKey, AuthVerifiableAttributeKey, AWSCredentials, } from './singleton/Auth/types';
11
11
  export { Platform, getAmplifyUserAgentObject, getAmplifyUserAgent, } from './Platform';
12
- export { ApiAction, AuthAction, AnalyticsAction, Category, CustomUserAgentDetails, DataStoreAction, Framework, GeoAction, InteractionsAction, InAppMessagingAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction, SetCustomUserAgentInput, } from './Platform/types';
12
+ export { ApiAction, AuthAction, AnalyticsAction, Category, CustomUserAgentDetails, DataStoreAction, Framework, GeoAction, InteractionsAction, InAppMessagingAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction, SetCustomUserAgentInput, StorageUserAgentInput, AuthUserAgentInput, InAppMessagingUserAgentInput, GeoUserAgentInput, } from './Platform/types';
13
13
  export { setCustomUserAgent } from './Platform/customUserAgent';
14
- export { ServiceWorker } from './ServiceWorker';
14
+ export { AmplifyError, PlatformNotSupportedError, createAssertionFunction, } from './errors';
15
+ export { AmplifyErrorCode, AmplifyErrorMap, AmplifyErrorParams, AssertionFunction, ServiceError, } from './types';
15
16
  export { BackgroundProcessManager } from './BackgroundProcessManager';
16
17
  export { Mutex } from './Mutex';
17
18
  export { Reachability } from './Reachability';
18
- export { AmplifyError, PlatformNotSupportedError, createAssertionFunction, } from './errors';
19
- export { AmplifyErrorCode, AmplifyErrorMap, AmplifyErrorParams, AssertionFunction, ServiceError, } from './types';
20
19
  export { INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, USER_AGENT_HEADER, } from './constants';
21
20
  export { fetchAuthSession } from './singleton/apis/internal/fetchAuthSession';
22
21
  export { AMPLIFY_SYMBOL } from './Hub';
23
22
  export { base64Decoder, base64Encoder } from './utils/convert';
24
23
  export { getCrypto } from './utils/globalHelpers';
25
24
  export { HubInternal } from './Hub';
25
+ export { sessionListener } from './utils/sessionListener';
26
+ export { SessionState } from './utils/sessionListener/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
- exports.base64Decoder = exports.AMPLIFY_SYMBOL = exports.fetchAuthSession = exports.USER_AGENT_HEADER = exports.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = exports.AmplifyErrorCode = exports.createAssertionFunction = exports.PlatformNotSupportedError = exports.AmplifyError = exports.Reachability = exports.Mutex = exports.BackgroundProcessManager = exports.ServiceWorker = exports.setCustomUserAgent = exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InAppMessagingAction = exports.InteractionsAction = exports.GeoAction = exports.Framework = exports.DataStoreAction = exports.Category = exports.AnalyticsAction = exports.AuthAction = exports.ApiAction = exports.getAmplifyUserAgent = exports.getAmplifyUserAgentObject = exports.Platform = exports.ClientDevice = exports.Logger = exports.ConsoleLogger = exports.Signer = exports.isTokenExpired = exports.assertOAuthConfig = exports.assertIdentityPoolIdConfig = exports.assertTokenProviderConfig = exports.decodeJWT = exports.parseAWSExports = exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.NonRetryableError = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isWebWorker = exports.isNonRetryableError = exports.isBrowser = exports.generateRandomString = void 0;
6
- exports.HubInternal = exports.getCrypto = exports.base64Encoder = void 0;
5
+ exports.base64Encoder = exports.base64Decoder = exports.AMPLIFY_SYMBOL = exports.fetchAuthSession = exports.USER_AGENT_HEADER = exports.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = exports.Reachability = exports.Mutex = exports.BackgroundProcessManager = exports.AmplifyErrorCode = exports.createAssertionFunction = exports.PlatformNotSupportedError = exports.AmplifyError = exports.setCustomUserAgent = exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InAppMessagingAction = exports.InteractionsAction = exports.GeoAction = exports.Framework = exports.DataStoreAction = exports.Category = exports.AnalyticsAction = exports.AuthAction = exports.ApiAction = exports.getAmplifyUserAgent = exports.getAmplifyUserAgentObject = exports.Platform = exports.Signer = exports.isTokenExpired = exports.assertOAuthConfig = exports.assertIdentityPoolIdConfig = exports.assertTokenProviderConfig = exports.decodeJWT = exports.AmplifyUrlSearchParams = exports.AmplifyUrl = exports.amplifyUuid = exports.parseAWSExports = exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.NonRetryableError = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isWebWorker = exports.isNonRetryableError = exports.isBrowser = exports.generateRandomString = void 0;
6
+ exports.sessionListener = exports.HubInternal = exports.getCrypto = void 0;
7
7
  /*
8
8
  This file maps top-level exports from `@aws-amplify/core/internals/utils`. These are intended to be internal
9
9
  utils for use throughout the library.
@@ -22,6 +22,11 @@ Object.defineProperty(exports, "urlSafeDecode", { enumerable: true, get: functio
22
22
  Object.defineProperty(exports, "urlSafeEncode", { enumerable: true, get: function () { return utils_1.urlSafeEncode; } });
23
23
  var parseAWSExports_1 = require("./parseAWSExports");
24
24
  Object.defineProperty(exports, "parseAWSExports", { enumerable: true, get: function () { return parseAWSExports_1.parseAWSExports; } });
25
+ var amplifyUuid_1 = require("./utils/amplifyUuid");
26
+ Object.defineProperty(exports, "amplifyUuid", { enumerable: true, get: function () { return amplifyUuid_1.amplifyUuid; } });
27
+ var amplifyUrl_1 = require("./utils/amplifyUrl");
28
+ Object.defineProperty(exports, "AmplifyUrl", { enumerable: true, get: function () { return amplifyUrl_1.AmplifyUrl; } });
29
+ Object.defineProperty(exports, "AmplifyUrlSearchParams", { enumerable: true, get: function () { return amplifyUrl_1.AmplifyUrlSearchParams; } });
25
30
  // Auth utilities
26
31
  var utils_2 = require("./singleton/Auth/utils");
27
32
  Object.defineProperty(exports, "decodeJWT", { enumerable: true, get: function () { return utils_2.decodeJWT; } });
@@ -32,13 +37,7 @@ var Auth_1 = require("./singleton/Auth");
32
37
  Object.defineProperty(exports, "isTokenExpired", { enumerable: true, get: function () { return Auth_1.isTokenExpired; } });
33
38
  var Signer_1 = require("./Signer");
34
39
  Object.defineProperty(exports, "Signer", { enumerable: true, get: function () { return Signer_1.Signer; } });
35
- // Logging utilities
36
- var Logger_1 = require("./Logger");
37
- Object.defineProperty(exports, "ConsoleLogger", { enumerable: true, get: function () { return Logger_1.ConsoleLogger; } });
38
- Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return Logger_1.ConsoleLogger; } });
39
40
  // Platform & user-agent utilities
40
- var ClientDevice_1 = require("./ClientDevice");
41
- Object.defineProperty(exports, "ClientDevice", { enumerable: true, get: function () { return ClientDevice_1.ClientDevice; } });
42
41
  var Platform_1 = require("./Platform");
43
42
  Object.defineProperty(exports, "Platform", { enumerable: true, get: function () { return Platform_1.Platform; } });
44
43
  Object.defineProperty(exports, "getAmplifyUserAgentObject", { enumerable: true, get: function () { return Platform_1.getAmplifyUserAgentObject; } });
@@ -59,9 +58,13 @@ Object.defineProperty(exports, "PushNotificationAction", { enumerable: true, get
59
58
  Object.defineProperty(exports, "StorageAction", { enumerable: true, get: function () { return types_1.StorageAction; } });
60
59
  var customUserAgent_1 = require("./Platform/customUserAgent");
61
60
  Object.defineProperty(exports, "setCustomUserAgent", { enumerable: true, get: function () { return customUserAgent_1.setCustomUserAgent; } });
62
- // Service worker
63
- var ServiceWorker_1 = require("./ServiceWorker");
64
- Object.defineProperty(exports, "ServiceWorker", { enumerable: true, get: function () { return ServiceWorker_1.ServiceWorker; } });
61
+ // Error handling
62
+ var errors_1 = require("./errors");
63
+ Object.defineProperty(exports, "AmplifyError", { enumerable: true, get: function () { return errors_1.AmplifyError; } });
64
+ Object.defineProperty(exports, "PlatformNotSupportedError", { enumerable: true, get: function () { return errors_1.PlatformNotSupportedError; } });
65
+ Object.defineProperty(exports, "createAssertionFunction", { enumerable: true, get: function () { return errors_1.createAssertionFunction; } });
66
+ var types_2 = require("./types");
67
+ Object.defineProperty(exports, "AmplifyErrorCode", { enumerable: true, get: function () { return types_2.AmplifyErrorCode; } });
65
68
  // Other utilities & constants
66
69
  var BackgroundProcessManager_1 = require("./BackgroundProcessManager");
67
70
  Object.defineProperty(exports, "BackgroundProcessManager", { enumerable: true, get: function () { return BackgroundProcessManager_1.BackgroundProcessManager; } });
@@ -69,12 +72,6 @@ var Mutex_1 = require("./Mutex");
69
72
  Object.defineProperty(exports, "Mutex", { enumerable: true, get: function () { return Mutex_1.Mutex; } });
70
73
  var Reachability_1 = require("./Reachability");
71
74
  Object.defineProperty(exports, "Reachability", { enumerable: true, get: function () { return Reachability_1.Reachability; } });
72
- var errors_1 = require("./errors");
73
- Object.defineProperty(exports, "AmplifyError", { enumerable: true, get: function () { return errors_1.AmplifyError; } });
74
- Object.defineProperty(exports, "PlatformNotSupportedError", { enumerable: true, get: function () { return errors_1.PlatformNotSupportedError; } });
75
- Object.defineProperty(exports, "createAssertionFunction", { enumerable: true, get: function () { return errors_1.createAssertionFunction; } });
76
- var types_2 = require("./types");
77
- Object.defineProperty(exports, "AmplifyErrorCode", { enumerable: true, get: function () { return types_2.AmplifyErrorCode; } });
78
75
  var constants_1 = require("./constants");
79
76
  Object.defineProperty(exports, "INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER", { enumerable: true, get: function () { return constants_1.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER; } });
80
77
  Object.defineProperty(exports, "USER_AGENT_HEADER", { enumerable: true, get: function () { return constants_1.USER_AGENT_HEADER; } });
@@ -90,3 +87,6 @@ Object.defineProperty(exports, "getCrypto", { enumerable: true, get: function ()
90
87
  // Hub
91
88
  var Hub_2 = require("./Hub");
92
89
  Object.defineProperty(exports, "HubInternal", { enumerable: true, get: function () { return Hub_2.HubInternal; } });
90
+ // Session listener
91
+ var sessionListener_1 = require("./utils/sessionListener");
92
+ Object.defineProperty(exports, "sessionListener", { enumerable: true, get: function () { return sessionListener_1.sessionListener; } });
@@ -58,9 +58,9 @@ var authTypeMapping = {
58
58
  * @returns A {@link ResourcesConfig} object.
59
59
  */
60
60
  var parseAWSExports = function (config) {
61
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
61
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
62
62
  if (config === void 0) { config = {}; }
63
- var aws_appsync_apiKey = config.aws_appsync_apiKey, aws_appsync_authenticationType = config.aws_appsync_authenticationType, aws_appsync_graphqlEndpoint = config.aws_appsync_graphqlEndpoint, aws_appsync_region = config.aws_appsync_region, aws_cognito_identity_pool_id = config.aws_cognito_identity_pool_id, aws_cognito_sign_up_verification_method = config.aws_cognito_sign_up_verification_method, aws_cognito_mfa_configuration = config.aws_cognito_mfa_configuration, aws_cognito_mfa_types = config.aws_cognito_mfa_types, aws_cognito_password_protection_settings = config.aws_cognito_password_protection_settings, aws_cognito_verification_mechanisms = config.aws_cognito_verification_mechanisms, aws_cognito_signup_attributes = config.aws_cognito_signup_attributes, aws_cognito_username_attributes = config.aws_cognito_username_attributes, aws_mandatory_sign_in = config.aws_mandatory_sign_in, aws_mobile_analytics_app_id = config.aws_mobile_analytics_app_id, aws_mobile_analytics_app_region = config.aws_mobile_analytics_app_region, aws_user_files_s3_bucket = config.aws_user_files_s3_bucket, aws_user_files_s3_bucket_region = config.aws_user_files_s3_bucket_region, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing = config.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing, aws_user_pools_id = config.aws_user_pools_id, aws_user_pools_web_client_id = config.aws_user_pools_web_client_id, geo = config.geo, oauth = config.oauth, aws_cloud_logic_custom = config.aws_cloud_logic_custom, Notifications = config.Notifications, modelIntrospection = config.modelIntrospection;
63
+ var aws_appsync_apiKey = config.aws_appsync_apiKey, aws_appsync_authenticationType = config.aws_appsync_authenticationType, aws_appsync_graphqlEndpoint = config.aws_appsync_graphqlEndpoint, aws_appsync_region = config.aws_appsync_region, aws_bots = config.aws_bots, aws_bots_config = config.aws_bots_config, aws_cognito_identity_pool_id = config.aws_cognito_identity_pool_id, aws_cognito_sign_up_verification_method = config.aws_cognito_sign_up_verification_method, aws_cognito_mfa_configuration = config.aws_cognito_mfa_configuration, aws_cognito_mfa_types = config.aws_cognito_mfa_types, aws_cognito_password_protection_settings = config.aws_cognito_password_protection_settings, aws_cognito_verification_mechanisms = config.aws_cognito_verification_mechanisms, aws_cognito_signup_attributes = config.aws_cognito_signup_attributes, aws_cognito_username_attributes = config.aws_cognito_username_attributes, aws_mandatory_sign_in = config.aws_mandatory_sign_in, aws_mobile_analytics_app_id = config.aws_mobile_analytics_app_id, aws_mobile_analytics_app_region = config.aws_mobile_analytics_app_region, aws_user_files_s3_bucket = config.aws_user_files_s3_bucket, aws_user_files_s3_bucket_region = config.aws_user_files_s3_bucket_region, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing = config.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing, aws_user_pools_id = config.aws_user_pools_id, aws_user_pools_web_client_id = config.aws_user_pools_web_client_id, geo = config.geo, oauth = config.oauth, aws_cloud_logic_custom = config.aws_cloud_logic_custom, Notifications = config.Notifications, modelIntrospection = config.modelIntrospection;
64
64
  var amplifyConfig = {};
65
65
  // Analytics
66
66
  if (aws_mobile_analytics_app_id) {
@@ -72,18 +72,33 @@ var parseAWSExports = function (config) {
72
72
  };
73
73
  }
74
74
  // Notifications
75
- if (Notifications) {
76
- if ((_a = Notifications.InAppMessaging) === null || _a === void 0 ? void 0 : _a.AWSPinpoint) {
77
- var _p = Notifications.InAppMessaging.AWSPinpoint, appId = _p.appId, region = _p.region;
78
- amplifyConfig.Notifications = {
79
- InAppMessaging: {
80
- Pinpoint: {
81
- appId: appId,
82
- region: region,
83
- },
75
+ var _o = Notifications !== null && Notifications !== void 0 ? Notifications : {}, InAppMessaging = _o.InAppMessaging, Push = _o.Push;
76
+ if ((InAppMessaging === null || InAppMessaging === void 0 ? void 0 : InAppMessaging.AWSPinpoint) || (Push === null || Push === void 0 ? void 0 : Push.AWSPinpoint)) {
77
+ amplifyConfig.Notifications = {};
78
+ if (InAppMessaging === null || InAppMessaging === void 0 ? void 0 : InAppMessaging.AWSPinpoint) {
79
+ var _p = InAppMessaging.AWSPinpoint, appId = _p.appId, region = _p.region;
80
+ amplifyConfig.Notifications.InAppMessaging = {
81
+ Pinpoint: {
82
+ appId: appId,
83
+ region: region,
84
84
  },
85
85
  };
86
86
  }
87
+ if (Push === null || Push === void 0 ? void 0 : Push.AWSPinpoint) {
88
+ var _q = Push.AWSPinpoint, appId = _q.appId, region = _q.region;
89
+ amplifyConfig.Notifications.PushNotification = {
90
+ Pinpoint: {
91
+ appId: appId,
92
+ region: region,
93
+ },
94
+ };
95
+ }
96
+ }
97
+ // Interactions
98
+ if (Array.isArray(aws_bots_config)) {
99
+ amplifyConfig.Interactions = {
100
+ LexV1: Object.fromEntries(aws_bots_config.map(function (bot) { return [bot.name, bot]; })),
101
+ };
87
102
  }
88
103
  // API
89
104
  if (aws_appsync_graphqlEndpoint) {
@@ -108,17 +123,17 @@ var parseAWSExports = function (config) {
108
123
  ? {
109
124
  status: aws_cognito_mfa_configuration &&
110
125
  aws_cognito_mfa_configuration.toLowerCase(),
111
- totpEnabled: (_b = aws_cognito_mfa_types === null || aws_cognito_mfa_types === void 0 ? void 0 : aws_cognito_mfa_types.includes('TOTP')) !== null && _b !== void 0 ? _b : false,
112
- smsEnabled: (_c = aws_cognito_mfa_types === null || aws_cognito_mfa_types === void 0 ? void 0 : aws_cognito_mfa_types.includes('SMS')) !== null && _c !== void 0 ? _c : false,
126
+ totpEnabled: (_a = aws_cognito_mfa_types === null || aws_cognito_mfa_types === void 0 ? void 0 : aws_cognito_mfa_types.includes('TOTP')) !== null && _a !== void 0 ? _a : false,
127
+ smsEnabled: (_b = aws_cognito_mfa_types === null || aws_cognito_mfa_types === void 0 ? void 0 : aws_cognito_mfa_types.includes('SMS')) !== null && _b !== void 0 ? _b : false,
113
128
  }
114
129
  : undefined;
115
130
  var passwordFormatConfig = aws_cognito_password_protection_settings
116
131
  ? {
117
132
  minLength: aws_cognito_password_protection_settings.passwordPolicyMinLength,
118
- requireLowercase: (_e = (_d = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _d === void 0 ? void 0 : _d.includes('REQUIRES_LOWERCASE')) !== null && _e !== void 0 ? _e : false,
119
- requireUppercase: (_g = (_f = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _f === void 0 ? void 0 : _f.includes('REQUIRES_UPPERCASE')) !== null && _g !== void 0 ? _g : false,
120
- requireNumbers: (_j = (_h = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _h === void 0 ? void 0 : _h.includes('REQUIRES_NUMBERS')) !== null && _j !== void 0 ? _j : false,
121
- requireSpecialCharacters: (_l = (_k = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _k === void 0 ? void 0 : _k.includes('REQUIRES_SYMBOLS')) !== null && _l !== void 0 ? _l : false,
133
+ requireLowercase: (_d = (_c = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _c === void 0 ? void 0 : _c.includes('REQUIRES_LOWERCASE')) !== null && _d !== void 0 ? _d : false,
134
+ requireUppercase: (_f = (_e = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _e === void 0 ? void 0 : _e.includes('REQUIRES_UPPERCASE')) !== null && _f !== void 0 ? _f : false,
135
+ requireNumbers: (_h = (_g = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _g === void 0 ? void 0 : _g.includes('REQUIRES_NUMBERS')) !== null && _h !== void 0 ? _h : false,
136
+ requireSpecialCharacters: (_k = (_j = aws_cognito_password_protection_settings.passwordPolicyCharacters) === null || _j === void 0 ? void 0 : _j.includes('REQUIRES_SYMBOLS')) !== null && _k !== void 0 ? _k : false,
122
137
  }
123
138
  : undefined;
124
139
  var mergedUserAttributes = Array.from(new Set(__spreadArray(__spreadArray([], __read((aws_cognito_verification_mechanisms !== null && aws_cognito_verification_mechanisms !== void 0 ? aws_cognito_verification_mechanisms : [])), false), __read((aws_cognito_signup_attributes !== null && aws_cognito_signup_attributes !== void 0 ? aws_cognito_signup_attributes : [])), false)));
@@ -130,8 +145,8 @@ var parseAWSExports = function (config) {
130
145
  },
131
146
  _a);
132
147
  });
133
- var loginWithEmailEnabled = (_m = aws_cognito_username_attributes === null || aws_cognito_username_attributes === void 0 ? void 0 : aws_cognito_username_attributes.includes('EMAIL')) !== null && _m !== void 0 ? _m : false;
134
- var loginWithPhoneEnabled = (_o = aws_cognito_username_attributes === null || aws_cognito_username_attributes === void 0 ? void 0 : aws_cognito_username_attributes.includes('PHONE_NUMBER')) !== null && _o !== void 0 ? _o : false;
148
+ var loginWithEmailEnabled = (_l = aws_cognito_username_attributes === null || aws_cognito_username_attributes === void 0 ? void 0 : aws_cognito_username_attributes.includes('EMAIL')) !== null && _l !== void 0 ? _l : false;
149
+ var loginWithPhoneEnabled = (_m = aws_cognito_username_attributes === null || aws_cognito_username_attributes === void 0 ? void 0 : aws_cognito_username_attributes.includes('PHONE_NUMBER')) !== null && _m !== void 0 ? _m : false;
135
150
  if (aws_cognito_identity_pool_id || aws_user_pools_id) {
136
151
  amplifyConfig.Auth = {
137
152
  Cognito: {
@@ -1,2 +1,2 @@
1
- import { Credentials } from '@aws-sdk/types';
2
- export declare const flushEvents: (appId: string, region: string, credentials: Credentials, identityId?: string, userAgentValue?: string) => void;
1
+ import { AWSCredentials } from '../../../libraryUtils';
2
+ export declare const flushEvents: (appId: string, region: string, credentials: AWSCredentials, identityId?: string, userAgentValue?: string) => void;
@@ -2,4 +2,4 @@ import { PinpointRecordInput } from '../types';
2
2
  /**
3
3
  * @internal
4
4
  */
5
- export declare const record: ({ appId, category, credentials, event, identityId, region, userAgentValue, }: PinpointRecordInput) => Promise<void>;
5
+ export declare const record: ({ appId, category, channelType, credentials, event, identityId, region, userAgentValue, }: PinpointRecordInput) => Promise<void>;
@@ -39,29 +39,24 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
39
39
  };
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
41
  exports.record = void 0;
42
- var uuid_1 = require("uuid");
42
+ var amplifyUuid_1 = require("../../../utils/amplifyUuid");
43
43
  var utils_1 = require("../utils");
44
44
  var constants_1 = require("../utils/constants");
45
- var updateEndpoint_1 = require("./updateEndpoint");
46
45
  var getEventBuffer_1 = require("../utils/getEventBuffer");
47
- var errors_1 = require("../../../errors");
48
46
  // TODO(v6) Refactor when we add support for session tracking & `autoTrack`
49
47
  var session;
50
48
  /**
51
49
  * @internal
52
50
  */
53
51
  var record = function (_a) {
54
- var appId = _a.appId, category = _a.category, credentials = _a.credentials, event = _a.event, identityId = _a.identityId, region = _a.region, userAgentValue = _a.userAgentValue;
52
+ var appId = _a.appId, category = _a.category, channelType = _a.channelType, credentials = _a.credentials, event = _a.event, identityId = _a.identityId, region = _a.region, userAgentValue = _a.userAgentValue;
55
53
  return __awaiter(void 0, void 0, void 0, function () {
56
- var timestampISOString, eventId, endpointId, buffer, sessionId;
54
+ var timestampISOString, eventId, buffer, endpointId, sessionId;
57
55
  return __generator(this, function (_b) {
58
56
  switch (_b.label) {
59
57
  case 0:
60
58
  timestampISOString = new Date().toISOString();
61
- eventId = (0, uuid_1.v4)();
62
- return [4 /*yield*/, (0, utils_1.getEndpointId)(appId, category)];
63
- case 1:
64
- endpointId = _b.sent();
59
+ eventId = (0, amplifyUuid_1.amplifyUuid)();
65
60
  buffer = (0, getEventBuffer_1.getEventBuffer)({
66
61
  appId: appId,
67
62
  bufferSize: constants_1.BUFFER_SIZE,
@@ -73,31 +68,20 @@ var record = function (_a) {
73
68
  resendLimit: constants_1.RESEND_LIMIT,
74
69
  userAgentValue: userAgentValue,
75
70
  });
76
- if (!!endpointId) return [3 /*break*/, 4];
77
- return [4 /*yield*/, (0, updateEndpoint_1.updateEndpoint)({
71
+ return [4 /*yield*/, (0, utils_1.resolveEndpointId)({
78
72
  appId: appId,
79
73
  category: category,
74
+ channelType: channelType,
80
75
  credentials: credentials,
81
76
  identityId: identityId,
82
77
  region: region,
83
78
  userAgentValue: userAgentValue,
84
79
  })];
85
- case 2:
86
- _b.sent();
87
- return [4 /*yield*/, (0, utils_1.getEndpointId)(appId, category)];
88
- case 3:
80
+ case 1:
89
81
  endpointId = _b.sent();
90
- _b.label = 4;
91
- case 4:
92
- if (!endpointId) {
93
- throw new errors_1.AmplifyError({
94
- name: 'ENDPOINT_NOT_CREATED',
95
- message: 'Endpoint was not created.',
96
- });
97
- }
98
82
  // Generate session if required
99
83
  if (!session) {
100
- sessionId = (0, uuid_1.v4)();
84
+ sessionId = (0, amplifyUuid_1.amplifyUuid)();
101
85
  session = {
102
86
  Id: sessionId,
103
87
  StartTimestamp: timestampISOString,
@@ -50,8 +50,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
50
50
  };
51
51
  Object.defineProperty(exports, "__esModule", { value: true });
52
52
  exports.updateEndpoint = void 0;
53
- var uuid_1 = require("uuid");
54
- var ClientDevice_1 = require("../../../ClientDevice");
53
+ var amplifyUuid_1 = require("../../../utils/amplifyUuid");
54
+ var getClientInfo_1 = require("../../../utils/getClientInfo");
55
55
  var pinpoint_1 = require("../../../awsClients/pinpoint");
56
56
  var utils_1 = require("../utils");
57
57
  /**
@@ -66,9 +66,9 @@ var updateEndpoint = function (_a) {
66
66
  case 0: return [4 /*yield*/, (0, utils_1.getEndpointId)(appId, category)];
67
67
  case 1:
68
68
  endpointId = _c.sent();
69
- createdEndpointId = !endpointId ? (0, uuid_1.v4)() : undefined;
69
+ createdEndpointId = !endpointId ? (0, amplifyUuid_1.amplifyUuid)() : undefined;
70
70
  _b = userProfile !== null && userProfile !== void 0 ? userProfile : {}, customProperties = _b.customProperties, demographic = _b.demographic, email = _b.email, location = _b.location, metrics = _b.metrics, name = _b.name, plan = _b.plan;
71
- clientInfo = ClientDevice_1.ClientDevice.clientInfo();
71
+ clientInfo = (0, getClientInfo_1.getClientInfo)();
72
72
  mergedDemographic = __assign({ appVersion: clientInfo.appVersion, make: clientInfo.make, model: clientInfo.model, modelVersion: clientInfo.version, platform: clientInfo.platform }, demographic);
73
73
  shouldAddAttributes = email || customProperties || name || plan;
74
74
  attributes = __assign(__assign(__assign(__assign({}, (email && { email: [email] })), (name && { name: [name] })), (plan && { plan: [plan] })), customProperties);
@@ -76,7 +76,7 @@ var updateEndpoint = function (_a) {
76
76
  ApplicationId: appId,
77
77
  EndpointId: endpointId !== null && endpointId !== void 0 ? endpointId : createdEndpointId,
78
78
  EndpointRequest: {
79
- RequestId: (0, uuid_1.v4)(),
79
+ RequestId: (0, amplifyUuid_1.amplifyUuid)(),
80
80
  EffectiveDate: new Date().toISOString(),
81
81
  ChannelType: channelType,
82
82
  Address: address,
@@ -112,7 +112,7 @@ var updateEndpoint = function (_a) {
112
112
  _c.sent();
113
113
  // if we had to create an endpoint id, we need to now cache it
114
114
  if (!!createdEndpointId) {
115
- (0, utils_1.cacheEndpointId)(appId, category, createdEndpointId);
115
+ return [2 /*return*/, (0, utils_1.cacheEndpointId)(appId, category, createdEndpointId)];
116
116
  }
117
117
  return [2 /*return*/];
118
118
  }
@@ -1,3 +1,3 @@
1
1
  export * from './apis';
2
- export { PinpointAnalyticsEvent, PinpointServiceOptions } from './types';
3
- export { getEndpointId } from './utils';
2
+ export { PinpointAnalyticsEvent, PinpointServiceOptions, UpdateEndpointException, } from './types';
3
+ export { resolveEndpointId } from './utils';
@@ -16,7 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.getEndpointId = void 0;
19
+ exports.resolveEndpointId = exports.UpdateEndpointException = void 0;
20
20
  __exportStar(require("./apis"), exports);
21
+ var types_1 = require("./types");
22
+ Object.defineProperty(exports, "UpdateEndpointException", { enumerable: true, get: function () { return types_1.UpdateEndpointException; } });
21
23
  var utils_1 = require("./utils");
22
- Object.defineProperty(exports, "getEndpointId", { enumerable: true, get: function () { return utils_1.getEndpointId; } });
24
+ Object.defineProperty(exports, "resolveEndpointId", { enumerable: true, get: function () { return utils_1.resolveEndpointId; } });
@@ -0,0 +1,9 @@
1
+ export declare enum UpdateEndpointException {
2
+ BadRequestException = "BadRequestException",
3
+ ForbiddenException = "ForbiddenException",
4
+ InternalServerErrorException = "InternalServerErrorException",
5
+ MethodNotAllowedException = "MethodNotAllowedException",
6
+ NotFoundException = "NotFoundException",
7
+ PayloadTooLargeException = "PayloadTooLargeException",
8
+ TooManyRequestsException = "TooManyRequestsException"
9
+ }
@@ -0,0 +1,15 @@
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
+ exports.UpdateEndpointException = void 0;
6
+ var UpdateEndpointException;
7
+ (function (UpdateEndpointException) {
8
+ UpdateEndpointException["BadRequestException"] = "BadRequestException";
9
+ UpdateEndpointException["ForbiddenException"] = "ForbiddenException";
10
+ UpdateEndpointException["InternalServerErrorException"] = "InternalServerErrorException";
11
+ UpdateEndpointException["MethodNotAllowedException"] = "MethodNotAllowedException";
12
+ UpdateEndpointException["NotFoundException"] = "NotFoundException";
13
+ UpdateEndpointException["PayloadTooLargeException"] = "PayloadTooLargeException";
14
+ UpdateEndpointException["TooManyRequestsException"] = "TooManyRequestsException";
15
+ })(UpdateEndpointException = exports.UpdateEndpointException || (exports.UpdateEndpointException = {}));
@@ -1 +1,2 @@
1
+ export { UpdateEndpointException } from './errors';
1
2
  export * from './pinpoint';
@@ -16,4 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.UpdateEndpointException = void 0;
20
+ var errors_1 = require("./errors");
21
+ Object.defineProperty(exports, "UpdateEndpointException", { enumerable: true, get: function () { return errors_1.UpdateEndpointException; } });
19
22
  __exportStar(require("./pinpoint"), exports);
@@ -1,7 +1,7 @@
1
1
  import { AuthSession } from '../../../singleton/Auth/types';
2
2
  import { UserProfile } from '../../../types';
3
- export type SupportedCategory = 'Analytics' | 'InAppMessaging' | 'PushNotification';
4
- export type SupportedChannelType = 'APNS' | 'APNS_SANDBOX' | 'GCM' | 'IN_APP';
3
+ export type SupportedCategory = 'Analytics' | 'Core' | 'InAppMessaging' | 'PushNotification';
4
+ type SupportedChannelType = 'APNS' | 'APNS_SANDBOX' | 'GCM' | 'IN_APP';
5
5
  export type PinpointProviderConfig = {
6
6
  Pinpoint?: {
7
7
  appId: string;
@@ -25,13 +25,13 @@ export type PinpointAnalyticsEvent = {
25
25
  type PinpointCommonParameters = {
26
26
  appId: string;
27
27
  category: SupportedCategory;
28
+ channelType?: SupportedChannelType;
28
29
  credentials: Required<AuthSession>['credentials'];
29
30
  identityId?: AuthSession['identityId'];
30
31
  region: string;
31
32
  userAgentValue?: string;
32
33
  };
33
34
  export type PinpointUpdateEndpointInput = PinpointCommonParameters & PinpointServiceOptions & {
34
- channelType?: SupportedChannelType;
35
35
  userId?: string;
36
36
  userProfile?: UserProfile;
37
37
  };
@@ -1,3 +1,4 @@
1
1
  export { cacheEndpointId } from './cacheEndpointId';
2
2
  export { getCacheKey } from './getCacheKey';
3
3
  export { getEndpointId } from './getEndpointId';
4
+ export { resolveEndpointId } from './resolveEndpointId';
@@ -2,10 +2,12 @@
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getEndpointId = exports.getCacheKey = exports.cacheEndpointId = void 0;
5
+ exports.resolveEndpointId = exports.getEndpointId = exports.getCacheKey = exports.cacheEndpointId = void 0;
6
6
  var cacheEndpointId_1 = require("./cacheEndpointId");
7
7
  Object.defineProperty(exports, "cacheEndpointId", { enumerable: true, get: function () { return cacheEndpointId_1.cacheEndpointId; } });
8
8
  var getCacheKey_1 = require("./getCacheKey");
9
9
  Object.defineProperty(exports, "getCacheKey", { enumerable: true, get: function () { return getCacheKey_1.getCacheKey; } });
10
10
  var getEndpointId_1 = require("./getEndpointId");
11
11
  Object.defineProperty(exports, "getEndpointId", { enumerable: true, get: function () { return getEndpointId_1.getEndpointId; } });
12
+ var resolveEndpointId_1 = require("./resolveEndpointId");
13
+ Object.defineProperty(exports, "resolveEndpointId", { enumerable: true, get: function () { return resolveEndpointId_1.resolveEndpointId; } });