@aws-amplify/core 6.0.1-api-v6-models.8035dfc.0 → 6.0.1-api-v6-models.572a7b5.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.
- package/lib/Cache/StorageCache.d.ts +14 -31
- package/lib/Cache/StorageCache.js +97 -102
- package/lib/Cache/StorageCache.native.d.ts +19 -0
- package/lib/Cache/StorageCache.native.js +164 -0
- package/{lib-esm/Cache/AsyncStorageCache.d.ts → lib/Cache/StorageCacheCommon.d.ts} +124 -99
- package/lib/Cache/{AsyncStorageCache.js → StorageCacheCommon.js} +494 -432
- package/lib/Cache/constants.d.ts +6 -0
- package/lib/Cache/constants.js +17 -0
- package/lib/Cache/index.d.ts +2 -0
- package/lib/Cache/index.js +7 -0
- package/lib/Cache/types/cache.d.ts +38 -0
- package/lib/Cache/types/index.d.ts +1 -1
- package/lib/Cache/types/index.js +1 -1
- package/lib/Cache/{Utils → utils}/CacheList.d.ts +1 -1
- package/lib/Cache/{Utils → utils}/CacheList.js +2 -1
- package/lib/Cache/utils/cacheHelpers.d.ts +14 -0
- package/lib/Cache/utils/cacheHelpers.js +51 -0
- package/lib/Cache/{Utils → utils}/errorHelpers.d.ts +0 -1
- package/lib/Cache/{Utils → utils}/errorHelpers.js +0 -4
- package/lib/Cache/utils/index.d.ts +2 -0
- package/lib/Cache/utils/index.js +12 -0
- package/lib/I18n/I18n.js +1 -6
- package/lib/Platform/types.d.ts +18 -8
- package/lib/Platform/types.js +10 -2
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/Reachability/Reachability.d.ts +1 -0
- package/lib/Reachability/Reachability.js +42 -1
- package/lib/ServiceWorker/ServiceWorker.js +69 -17
- package/lib/ServiceWorker/index.d.ts +0 -12
- package/lib/ServiceWorker/index.js +0 -12
- package/lib/Signer/Signer.js +3 -2
- package/lib/awsClients/cognitoIdentity/base.js +2 -1
- package/lib/awsClients/pinpoint/base.js +2 -1
- package/lib/awsClients/pinpoint/getInAppMessages.js +2 -1
- package/lib/awsClients/pinpoint/putEvents.js +2 -1
- package/lib/awsClients/pinpoint/updateEndpoint.js +2 -1
- package/lib/clients/middleware/signing/signer/signatureV4/index.d.ts +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/index.js +0 -1
- package/lib/clients/middleware/signing/signer/signatureV4/presignUrl.js +2 -1
- package/lib/errors/errorHelpers.d.ts +2 -0
- package/lib/errors/errorHelpers.js +20 -0
- package/lib/errors/index.d.ts +1 -0
- package/lib/errors/index.js +3 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.js +9 -6
- package/lib/libraryUtils.d.ts +8 -7
- package/lib/libraryUtils.js +17 -17
- package/lib/parseAWSExports.js +34 -19
- package/lib/providers/pinpoint/apis/flushEvents.d.ts +2 -2
- package/lib/providers/pinpoint/apis/record.d.ts +1 -1
- package/lib/providers/pinpoint/apis/record.js +8 -24
- package/lib/providers/pinpoint/apis/updateEndpoint.js +6 -6
- package/lib/providers/pinpoint/index.d.ts +2 -2
- package/lib/providers/pinpoint/index.js +4 -2
- package/lib/providers/pinpoint/types/errors.d.ts +9 -0
- package/lib/providers/pinpoint/types/errors.js +15 -0
- package/lib/providers/pinpoint/types/index.d.ts +1 -0
- package/lib/providers/pinpoint/types/index.js +3 -0
- package/lib/providers/pinpoint/types/pinpoint.d.ts +3 -3
- package/lib/providers/pinpoint/utils/index.d.ts +1 -0
- package/lib/providers/pinpoint/utils/index.js +3 -1
- package/lib/providers/pinpoint/utils/resolveEndpointId.d.ts +8 -0
- package/lib/providers/pinpoint/utils/resolveEndpointId.js +85 -0
- package/lib/singleton/Amplify.d.ts +2 -2
- package/lib/singleton/Amplify.js +6 -5
- package/lib/singleton/Auth/types.d.ts +3 -3
- package/lib/singleton/Cache/types.d.ts +18 -0
- package/lib/singleton/Cache/types.js +4 -0
- package/lib/singleton/Interactions/types.d.ts +21 -0
- package/lib/singleton/Interactions/types.js +4 -0
- package/lib/singleton/Notifications/PushNotification/types.d.ts +2 -0
- package/lib/singleton/Notifications/PushNotification/types.js +4 -0
- package/lib/singleton/Notifications/types.d.ts +3 -1
- package/lib/singleton/types.d.ts +3 -3
- package/lib/storage/CookieStorage.js +8 -5
- package/lib/storage/DefaultStorage.js +1 -1
- package/lib/storage/utils.d.ts +1 -1
- package/lib/storage/utils.js +3 -3
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/errors.d.ts +1 -0
- package/lib/types/errors.js +1 -0
- package/lib/utils/amplifyUrl/index.d.ts +13 -0
- package/lib/utils/amplifyUrl/index.js +10 -0
- package/lib/utils/amplifyUrl/polyfill.d.ts +0 -0
- package/lib/utils/amplifyUrl/polyfill.js +4 -0
- package/lib/utils/amplifyUrl/polyfill.native.d.ts +1 -0
- package/lib/utils/amplifyUuid/index.d.ts +3 -0
- package/lib/utils/amplifyUuid/index.js +9 -0
- package/lib/utils/amplifyUuid/polyfill.d.ts +0 -0
- package/lib/utils/amplifyUuid/polyfill.js +4 -0
- package/lib/utils/amplifyUuid/polyfill.native.d.ts +1 -0
- package/lib/utils/amplifyUuid/polyfill.native.js +6 -0
- package/lib/utils/deepFreeze.d.ts +1 -0
- package/lib/utils/deepFreeze.js +38 -0
- package/lib/{ClientDevice/android.d.ts → utils/getClientInfo/getClientInfo.android.d.ts} +1 -1
- package/lib/{ClientDevice/android.js → utils/getClientInfo/getClientInfo.android.js} +4 -4
- package/lib/{ClientDevice/browser.d.ts → utils/getClientInfo/getClientInfo.d.ts} +1 -9
- package/lib/{ClientDevice/ios.d.ts → utils/getClientInfo/getClientInfo.ios.d.ts} +1 -1
- package/lib/{ClientDevice/ios.js → utils/getClientInfo/getClientInfo.ios.js} +4 -4
- package/lib/{ClientDevice/browser.js → utils/getClientInfo/getClientInfo.js} +6 -18
- package/lib/utils/getClientInfo/index.d.ts +1 -0
- package/lib/utils/getClientInfo/index.js +7 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +5 -1
- package/lib/utils/sessionListener/SessionListener.d.ts +10 -0
- package/lib/utils/sessionListener/SessionListener.js +55 -0
- package/lib/utils/sessionListener/SessionListener.native.d.ts +10 -0
- package/lib/utils/sessionListener/SessionListener.native.js +54 -0
- package/lib/utils/sessionListener/index.d.ts +2 -0
- package/lib/utils/sessionListener/index.js +7 -0
- package/lib/utils/sessionListener/types.d.ts +6 -0
- package/lib/utils/sessionListener/types.js +4 -0
- package/lib-esm/Cache/StorageCache.d.ts +14 -31
- package/lib-esm/Cache/StorageCache.js +97 -102
- package/lib-esm/Cache/StorageCache.native.d.ts +19 -0
- package/lib-esm/Cache/StorageCache.native.js +161 -0
- package/{lib/Cache/AsyncStorageCache.d.ts → lib-esm/Cache/StorageCacheCommon.d.ts} +124 -99
- package/lib-esm/Cache/{AsyncStorageCache.js → StorageCacheCommon.js} +493 -430
- package/lib-esm/Cache/constants.d.ts +6 -0
- package/lib-esm/Cache/constants.js +14 -0
- package/lib-esm/Cache/index.d.ts +2 -0
- package/lib-esm/Cache/index.js +4 -0
- package/lib-esm/Cache/types/cache.d.ts +38 -0
- package/lib-esm/Cache/types/index.d.ts +1 -1
- package/lib-esm/Cache/types/index.js +1 -1
- package/lib-esm/Cache/{Utils → utils}/CacheList.d.ts +1 -1
- package/lib-esm/Cache/{Utils → utils}/CacheList.js +1 -1
- package/lib-esm/Cache/utils/cacheHelpers.d.ts +14 -0
- package/lib-esm/Cache/utils/cacheHelpers.js +44 -0
- package/lib-esm/Cache/{Utils → utils}/errorHelpers.d.ts +0 -1
- package/lib-esm/Cache/{Utils → utils}/errorHelpers.js +0 -4
- package/lib-esm/Cache/utils/index.d.ts +2 -0
- package/lib-esm/Cache/utils/index.js +4 -0
- package/lib-esm/I18n/I18n.js +1 -6
- package/lib-esm/Platform/types.d.ts +18 -8
- package/lib-esm/Platform/types.js +10 -2
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/Reachability/Reachability.d.ts +1 -0
- package/lib-esm/Reachability/Reachability.js +43 -2
- package/lib-esm/ServiceWorker/ServiceWorker.js +69 -17
- package/lib-esm/ServiceWorker/index.d.ts +0 -12
- package/lib-esm/ServiceWorker/index.js +0 -12
- package/lib-esm/Signer/Signer.js +3 -2
- package/lib-esm/awsClients/cognitoIdentity/base.js +2 -1
- package/lib-esm/awsClients/pinpoint/base.js +2 -1
- package/lib-esm/awsClients/pinpoint/getInAppMessages.js +2 -1
- package/lib-esm/awsClients/pinpoint/putEvents.js +2 -1
- package/lib-esm/awsClients/pinpoint/updateEndpoint.js +2 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.d.ts +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/index.js +0 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/presignUrl.js +2 -1
- package/lib-esm/errors/errorHelpers.d.ts +2 -0
- package/lib-esm/errors/errorHelpers.js +17 -0
- package/lib-esm/errors/index.d.ts +1 -0
- package/lib-esm/errors/index.js +1 -0
- package/lib-esm/index.d.ts +4 -4
- package/lib-esm/index.js +5 -4
- package/lib-esm/libraryUtils.d.ts +8 -7
- package/lib-esm/libraryUtils.js +7 -7
- package/lib-esm/parseAWSExports.js +34 -19
- package/lib-esm/providers/pinpoint/apis/flushEvents.d.ts +2 -2
- package/lib-esm/providers/pinpoint/apis/record.d.ts +1 -1
- package/lib-esm/providers/pinpoint/apis/record.js +9 -25
- package/lib-esm/providers/pinpoint/apis/updateEndpoint.js +6 -6
- package/lib-esm/providers/pinpoint/index.d.ts +2 -2
- package/lib-esm/providers/pinpoint/index.js +2 -1
- package/lib-esm/providers/pinpoint/types/errors.d.ts +9 -0
- package/lib-esm/providers/pinpoint/types/errors.js +12 -0
- package/lib-esm/providers/pinpoint/types/index.d.ts +1 -0
- package/lib-esm/providers/pinpoint/types/index.js +1 -0
- package/lib-esm/providers/pinpoint/types/pinpoint.d.ts +3 -3
- package/lib-esm/providers/pinpoint/utils/index.d.ts +1 -0
- package/lib-esm/providers/pinpoint/utils/index.js +1 -0
- package/lib-esm/providers/pinpoint/utils/resolveEndpointId.d.ts +8 -0
- package/lib-esm/providers/pinpoint/utils/resolveEndpointId.js +81 -0
- package/lib-esm/singleton/Amplify.d.ts +2 -2
- package/lib-esm/singleton/Amplify.js +6 -5
- package/lib-esm/singleton/Auth/types.d.ts +3 -3
- package/lib-esm/singleton/Cache/types.d.ts +18 -0
- package/lib-esm/singleton/Cache/types.js +3 -0
- package/lib-esm/singleton/Interactions/types.d.ts +21 -0
- package/lib-esm/singleton/Interactions/types.js +3 -0
- package/lib-esm/singleton/Notifications/PushNotification/types.d.ts +2 -0
- package/lib-esm/singleton/Notifications/PushNotification/types.js +3 -0
- package/lib-esm/singleton/Notifications/types.d.ts +3 -1
- package/lib-esm/singleton/types.d.ts +3 -3
- package/lib-esm/storage/CookieStorage.js +5 -5
- package/lib-esm/storage/DefaultStorage.js +2 -2
- package/lib-esm/storage/utils.d.ts +1 -1
- package/lib-esm/storage/utils.js +1 -1
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/errors.d.ts +1 -0
- package/lib-esm/types/errors.js +1 -0
- package/lib-esm/utils/amplifyUrl/index.d.ts +13 -0
- package/lib-esm/utils/amplifyUrl/index.js +6 -0
- package/lib-esm/utils/amplifyUuid/index.d.ts +3 -0
- package/lib-esm/utils/amplifyUuid/index.js +6 -0
- package/lib-esm/utils/amplifyUuid/polyfill.native.js +4 -0
- package/lib-esm/utils/deepFreeze.d.ts +1 -0
- package/lib-esm/utils/deepFreeze.js +34 -0
- package/lib-esm/{ClientDevice/android.d.ts → utils/getClientInfo/getClientInfo.android.d.ts} +1 -1
- package/lib-esm/{ClientDevice/android.js → utils/getClientInfo/getClientInfo.android.js} +2 -2
- package/lib-esm/{ClientDevice/browser.d.ts → utils/getClientInfo/getClientInfo.d.ts} +1 -9
- package/lib-esm/{ClientDevice/ios.d.ts → utils/getClientInfo/getClientInfo.ios.d.ts} +1 -1
- package/lib-esm/{ClientDevice/ios.js → utils/getClientInfo/getClientInfo.ios.js} +2 -2
- package/lib-esm/{ClientDevice/browser.js → utils/getClientInfo/getClientInfo.js} +4 -14
- package/lib-esm/utils/getClientInfo/index.d.ts +1 -0
- package/lib-esm/utils/getClientInfo/index.js +3 -0
- package/lib-esm/utils/index.d.ts +2 -0
- package/lib-esm/utils/index.js +2 -0
- package/lib-esm/utils/sessionListener/SessionListener.d.ts +10 -0
- package/lib-esm/utils/sessionListener/SessionListener.js +52 -0
- package/lib-esm/utils/sessionListener/SessionListener.native.d.ts +10 -0
- package/lib-esm/utils/sessionListener/SessionListener.native.js +51 -0
- package/lib-esm/utils/sessionListener/index.d.ts +2 -0
- package/lib-esm/utils/sessionListener/index.js +4 -0
- package/lib-esm/utils/sessionListener/types.d.ts +6 -0
- package/lib-esm/utils/sessionListener/types.js +3 -0
- package/package.json +9 -19
- package/src/Cache/StorageCache.native.ts +65 -0
- package/src/Cache/StorageCache.ts +61 -158
- package/src/Cache/StorageCacheCommon.ts +577 -0
- package/src/Cache/constants.ts +18 -0
- package/src/Cache/index.ts +6 -0
- package/src/Cache/types/cache.ts +51 -0
- package/src/Cache/types/index.ts +4 -4
- package/src/Cache/{Utils → utils}/CacheList.ts +185 -185
- package/src/Cache/utils/cacheHelpers.ts +52 -0
- package/src/Cache/{Utils → utils}/errorHelpers.ts +0 -4
- package/src/Cache/{Utils → utils}/index.ts +4 -5
- package/src/I18n/I18n.ts +1 -6
- package/src/Platform/types.ts +20 -11
- package/src/Platform/version.ts +1 -1
- package/src/Reachability/Reachability.ts +22 -2
- package/src/ServiceWorker/ServiceWorker.ts +20 -17
- package/src/ServiceWorker/index.ts +0 -12
- package/src/Signer/Signer.ts +3 -2
- package/src/awsClients/cognitoIdentity/base.ts +4 -1
- package/src/awsClients/pinpoint/base.ts +2 -1
- package/src/awsClients/pinpoint/getInAppMessages.ts +2 -1
- package/src/awsClients/pinpoint/putEvents.ts +2 -1
- package/src/awsClients/pinpoint/updateEndpoint.ts +2 -1
- package/src/clients/middleware/signing/signer/signatureV4/index.ts +0 -2
- package/src/clients/middleware/signing/signer/signatureV4/presignUrl.ts +2 -1
- package/src/errors/errorHelpers.ts +20 -0
- package/src/errors/index.ts +1 -0
- package/src/index.ts +8 -4
- package/src/libraryUtils.ts +17 -11
- package/src/parseAWSExports.ts +28 -9
- package/src/providers/pinpoint/apis/flushEvents.ts +2 -2
- package/src/providers/pinpoint/apis/record.ts +14 -28
- package/src/providers/pinpoint/apis/updateEndpoint.ts +6 -6
- package/src/providers/pinpoint/index.ts +6 -2
- package/src/providers/pinpoint/types/errors.ts +12 -0
- package/src/providers/pinpoint/types/index.ts +1 -0
- package/src/providers/pinpoint/types/pinpoint.ts +3 -2
- package/src/providers/pinpoint/utils/index.ts +1 -0
- package/src/providers/pinpoint/utils/resolveEndpointId.ts +46 -0
- package/src/singleton/Amplify.ts +10 -8
- package/src/singleton/Auth/types.ts +3 -3
- package/src/singleton/Cache/types.ts +27 -0
- package/src/singleton/Interactions/types.ts +29 -0
- package/src/singleton/Notifications/PushNotification/types.ts +6 -0
- package/src/singleton/Notifications/types.ts +3 -1
- package/src/singleton/types.ts +3 -5
- package/src/storage/CookieStorage.ts +5 -9
- package/src/storage/DefaultStorage.ts +2 -2
- package/src/storage/utils.ts +1 -1
- package/src/types/errors.ts +1 -0
- package/src/utils/amplifyUrl/index.ts +9 -0
- package/src/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.ts → utils/amplifyUrl/polyfill.native.ts} +1 -0
- package/src/utils/amplifyUuid/index.ts +9 -0
- package/src/utils/amplifyUuid/polyfill.native.ts +6 -0
- package/src/utils/amplifyUuid/polyfill.ts +4 -0
- package/src/utils/deepFreeze.ts +16 -0
- package/src/{ClientDevice/android.ts → utils/getClientInfo/getClientInfo.android.ts} +2 -2
- package/src/{ClientDevice/ios.ts → utils/getClientInfo/getClientInfo.ios.ts} +3 -3
- package/src/{ClientDevice/browser.ts → utils/getClientInfo/getClientInfo.ts} +4 -16
- package/src/utils/getClientInfo/index.ts +4 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/sessionListener/SessionListener.native.ts +70 -0
- package/src/utils/sessionListener/SessionListener.ts +74 -0
- package/src/utils/sessionListener/index.ts +6 -0
- package/src/utils/sessionListener/types.ts +11 -0
- package/lib/Amplify.d.ts +0 -29
- package/lib/Amplify.js +0 -118
- package/lib/Cache/BrowserStorageCache.d.ts +0 -166
- package/lib/Cache/BrowserStorageCache.js +0 -456
- package/lib/Cache/InMemoryCache.d.ts +0 -129
- package/lib/Cache/InMemoryCache.js +0 -342
- package/lib/Cache/Utils/CacheUtils.d.ts +0 -25
- package/lib/Cache/Utils/CacheUtils.js +0 -86
- package/lib/Cache/Utils/index.d.ts +0 -2
- package/lib/Cache/Utils/index.js +0 -16
- package/lib/Cache/reactnative.d.ts +0 -3
- package/lib/Cache/reactnative.js +0 -8
- package/lib/Cache/types/Cache.d.ts +0 -55
- package/lib/ClientDevice/index.d.ts +0 -23
- package/lib/ClientDevice/index.js +0 -18
- package/lib/ClientDevice/reactnative.d.ts +0 -7
- package/lib/ClientDevice/reactnative.js +0 -24
- package/lib-esm/Amplify.d.ts +0 -29
- package/lib-esm/Amplify.js +0 -115
- package/lib-esm/Cache/BrowserStorageCache.d.ts +0 -166
- package/lib-esm/Cache/BrowserStorageCache.js +0 -453
- package/lib-esm/Cache/InMemoryCache.d.ts +0 -129
- package/lib-esm/Cache/InMemoryCache.js +0 -339
- package/lib-esm/Cache/Utils/CacheUtils.d.ts +0 -25
- package/lib-esm/Cache/Utils/CacheUtils.js +0 -79
- package/lib-esm/Cache/Utils/index.d.ts +0 -2
- package/lib-esm/Cache/Utils/index.js +0 -4
- package/lib-esm/Cache/reactnative.d.ts +0 -3
- package/lib-esm/Cache/reactnative.js +0 -6
- package/lib-esm/Cache/types/Cache.d.ts +0 -55
- package/lib-esm/ClientDevice/index.d.ts +0 -23
- package/lib-esm/ClientDevice/index.js +0 -15
- package/lib-esm/ClientDevice/reactnative.d.ts +0 -7
- package/lib-esm/ClientDevice/reactnative.js +0 -21
- package/src/Amplify.ts +0 -106
- package/src/Cache/AsyncStorageCache.ts +0 -495
- package/src/Cache/BrowserStorageCache.ts +0 -504
- package/src/Cache/CHANGELOG.md +0 -1239
- package/src/Cache/InMemoryCache.ts +0 -347
- package/src/Cache/Utils/CacheUtils.ts +0 -90
- package/src/Cache/reactnative.ts +0 -9
- package/src/Cache/types/Cache.ts +0 -75
- package/src/ClientDevice/index.ts +0 -14
- package/src/ClientDevice/reactnative.ts +0 -18
- package/lib/Cache/types/{Cache.js → cache.js} +0 -0
- package/lib/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.js → utils/amplifyUrl/polyfill.native.js} +1 -1
- /package/lib-esm/Cache/types/{Cache.js → cache.js} +0 -0
- /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.d.ts → utils/amplifyUrl/polyfill.d.ts} +0 -0
- /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.js → utils/amplifyUrl/polyfill.js} +0 -0
- /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.d.ts → utils/amplifyUrl/polyfill.native.d.ts} +0 -0
- /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.js → utils/amplifyUrl/polyfill.native.js} +0 -0
- /package/{lib/clients/middleware/signing/signer/signatureV4/polyfills/index.d.ts → lib-esm/utils/amplifyUuid/polyfill.d.ts} +0 -0
- /package/{lib/clients/middleware/signing/signer/signatureV4/polyfills/index.js → lib-esm/utils/amplifyUuid/polyfill.js} +0 -0
- /package/{lib/clients/middleware/signing/signer/signatureV4/polyfills/index.native.d.ts → lib-esm/utils/amplifyUuid/polyfill.native.d.ts} +0 -0
- /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
|
|
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
|
|
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 };
|
|
@@ -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
|
|
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,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);
|
package/lib/errors/index.d.ts
CHANGED
package/lib/errors/index.js
CHANGED
|
@@ -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
|
-
|
|
11
|
-
export {
|
|
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.
|
|
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
|
|
29
|
-
Object.defineProperty(exports, "
|
|
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; } });
|
package/lib/libraryUtils.d.ts
CHANGED
|
@@ -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 {
|
|
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';
|
package/lib/libraryUtils.js
CHANGED
|
@@ -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.
|
|
6
|
-
exports.
|
|
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
|
-
//
|
|
63
|
-
var
|
|
64
|
-
Object.defineProperty(exports, "
|
|
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; } });
|
package/lib/parseAWSExports.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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: (
|
|
112
|
-
smsEnabled: (
|
|
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: (
|
|
119
|
-
requireUppercase: (
|
|
120
|
-
requireNumbers: (
|
|
121
|
-
requireSpecialCharacters: (
|
|
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 = (
|
|
134
|
-
var loginWithPhoneEnabled = (
|
|
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 {
|
|
2
|
-
export declare const flushEvents: (appId: string, region: string, credentials:
|
|
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
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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
|
|
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,
|
|
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
|
|
54
|
-
var
|
|
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,
|
|
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 =
|
|
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,
|
|
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 {
|
|
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.
|
|
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, "
|
|
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 = {}));
|
|
@@ -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
|
-
|
|
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
|
};
|
|
@@ -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; } });
|