@aws-amplify/core 6.3.11-storage-browser.5e1740c.0 → 6.3.11-unstable.5224dc2.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/dist/cjs/Platform/types.js +0 -2
- package/dist/cjs/Platform/types.js.map +1 -1
- package/dist/cjs/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/clients/handlers/fetch.js +7 -4
- package/dist/cjs/clients/handlers/fetch.js.map +1 -1
- package/dist/cjs/clients/middleware/retry/defaultRetryDecider.js +2 -5
- package/dist/cjs/clients/middleware/retry/defaultRetryDecider.js.map +1 -1
- package/dist/cjs/clients/middleware/retry/middleware.js +1 -4
- package/dist/cjs/clients/middleware/retry/middleware.js.map +1 -1
- package/dist/cjs/clients/middleware/signing/middleware.js +2 -6
- package/dist/cjs/clients/middleware/signing/middleware.js.map +1 -1
- package/dist/cjs/errors/errorHelpers.js +3 -0
- package/dist/cjs/errors/errorHelpers.js.map +1 -1
- package/dist/cjs/singleton/Auth/utils/index.js +6 -0
- package/dist/cjs/singleton/Auth/utils/index.js.map +1 -1
- package/dist/cjs/singleton/apis/fetchAuthSession.js +9 -0
- package/dist/cjs/singleton/apis/fetchAuthSession.js.map +1 -1
- package/dist/cjs/types/errors.js +1 -0
- package/dist/cjs/types/errors.js.map +1 -1
- package/dist/esm/Platform/types.d.ts +1 -3
- package/dist/esm/Platform/types.mjs +0 -2
- package/dist/esm/Platform/types.mjs.map +1 -1
- package/dist/esm/Platform/version.d.ts +1 -1
- package/dist/esm/Platform/version.mjs +1 -1
- package/dist/esm/Platform/version.mjs.map +1 -1
- package/dist/esm/awsClients/cognitoIdentity/base.d.ts +1 -1
- package/dist/esm/awsClients/cognitoIdentity/base.mjs +2 -0
- package/dist/esm/awsClients/cognitoIdentity/base.mjs.map +1 -1
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.d.ts +1 -1
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs +2 -0
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs.map +1 -1
- package/dist/esm/awsClients/cognitoIdentity/getId.d.ts +1 -1
- package/dist/esm/awsClients/cognitoIdentity/getId.mjs +2 -0
- package/dist/esm/awsClients/cognitoIdentity/getId.mjs.map +1 -1
- package/dist/esm/awsClients/pinpoint/base.d.ts +1 -1
- package/dist/esm/awsClients/pinpoint/getInAppMessages.d.ts +2 -2
- package/dist/esm/awsClients/pinpoint/putEvents.d.ts +2 -2
- package/dist/esm/awsClients/pinpoint/updateEndpoint.d.ts +2 -2
- package/dist/esm/clients/handlers/fetch.mjs +8 -4
- package/dist/esm/clients/handlers/fetch.mjs.map +1 -1
- package/dist/esm/clients/index.d.ts +2 -2
- package/dist/esm/clients/middleware/retry/defaultRetryDecider.d.ts +1 -2
- package/dist/esm/clients/middleware/retry/defaultRetryDecider.mjs +2 -5
- package/dist/esm/clients/middleware/retry/defaultRetryDecider.mjs.map +1 -1
- package/dist/esm/clients/middleware/retry/index.d.ts +0 -1
- package/dist/esm/clients/middleware/retry/middleware.d.ts +1 -3
- package/dist/esm/clients/middleware/retry/middleware.mjs +1 -4
- package/dist/esm/clients/middleware/retry/middleware.mjs.map +1 -1
- package/dist/esm/clients/middleware/signing/index.d.ts +1 -1
- package/dist/esm/clients/middleware/signing/middleware.d.ts +2 -10
- package/dist/esm/clients/middleware/signing/middleware.mjs +2 -6
- package/dist/esm/clients/middleware/signing/middleware.mjs.map +1 -1
- package/dist/esm/clients/types/core.d.ts +0 -5
- package/dist/esm/clients/types/index.d.ts +1 -1
- package/dist/esm/errors/errorHelpers.mjs +3 -0
- package/dist/esm/errors/errorHelpers.mjs.map +1 -1
- package/dist/esm/providers/pinpoint/apis/updateEndpoint.mjs +2 -0
- package/dist/esm/providers/pinpoint/apis/updateEndpoint.mjs.map +1 -1
- package/dist/esm/providers/pinpoint/utils/PinpointEventBuffer.mjs +2 -0
- package/dist/esm/providers/pinpoint/utils/PinpointEventBuffer.mjs.map +1 -1
- package/dist/esm/singleton/Auth/utils/index.d.ts +6 -0
- package/dist/esm/singleton/Auth/utils/index.mjs +6 -0
- package/dist/esm/singleton/Auth/utils/index.mjs.map +1 -1
- package/dist/esm/singleton/apis/fetchAuthSession.d.ts +9 -0
- package/dist/esm/singleton/apis/fetchAuthSession.mjs +9 -0
- package/dist/esm/singleton/apis/fetchAuthSession.mjs.map +1 -1
- package/dist/esm/types/errors.d.ts +2 -1
- package/dist/esm/types/errors.mjs +1 -0
- package/dist/esm/types/errors.mjs.map +1 -1
- package/package.json +5 -5
- package/src/Platform/types.ts +0 -2
- package/src/Platform/version.ts +1 -1
- package/src/clients/handlers/fetch.ts +7 -4
- package/src/clients/index.ts +1 -6
- package/src/clients/middleware/retry/defaultRetryDecider.ts +4 -11
- package/src/clients/middleware/retry/index.ts +0 -1
- package/src/clients/middleware/retry/middleware.ts +2 -16
- package/src/clients/middleware/signing/index.ts +1 -5
- package/src/clients/middleware/signing/middleware.ts +3 -21
- package/src/clients/types/core.ts +0 -5
- package/src/clients/types/index.ts +0 -1
- package/src/errors/errorHelpers.ts +3 -0
- package/src/singleton/Auth/utils/index.ts +6 -0
- package/src/singleton/apis/fetchAuthSession.ts +9 -0
- package/src/types/errors.ts +1 -0
- package/dist/cjs/clients/middleware/retry/types.js +0 -6
- package/dist/cjs/clients/middleware/retry/types.js.map +0 -1
- package/dist/esm/clients/middleware/retry/types.d.ts +0 -4
- package/dist/esm/clients/middleware/retry/types.mjs +0 -2
- package/dist/esm/clients/middleware/retry/types.mjs.map +0 -1
- package/src/clients/middleware/retry/types.ts +0 -7
|
@@ -119,7 +119,5 @@ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction =
|
|
|
119
119
|
StorageAction["Remove"] = "5";
|
|
120
120
|
StorageAction["GetProperties"] = "6";
|
|
121
121
|
StorageAction["GetUrl"] = "7";
|
|
122
|
-
StorageAction["GetDataAccess"] = "8";
|
|
123
|
-
StorageAction["ListCallerAccessGrants"] = "9";
|
|
124
122
|
})(exports.StorageAction || (exports.StorageAction = {}));
|
|
125
123
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/Platform/types.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InteractionsAction = exports.InAppMessagingAction = exports.GeoAction = exports.DataStoreAction = exports.AuthAction = exports.ApiAction = exports.AnalyticsAction = exports.Category = exports.Framework = void 0;\nvar Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework = exports.Framework || (exports.Framework = {}));\nvar Category;\n(function (Category) {\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category = exports.Category || (exports.Category = {}));\nvar AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction = exports.AnalyticsAction || (exports.AnalyticsAction = {}));\nvar ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction = exports.ApiAction || (exports.ApiAction = {}));\nvar AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n})(AuthAction = exports.AuthAction || (exports.AuthAction = {}));\nvar DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction = exports.DataStoreAction || (exports.DataStoreAction = {}));\nvar GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction = exports.GeoAction || (exports.GeoAction = {}));\nvar InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction = exports.InAppMessagingAction || (exports.InAppMessagingAction = {}));\nvar InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction = exports.InteractionsAction || (exports.InteractionsAction = {}));\nvar PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction = exports.PredictionsAction || (exports.PredictionsAction = {}));\nvar PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction = exports.PubSubAction || (exports.PubSubAction = {}));\nvar PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction = exports.PushNotificationAction || (exports.PushNotificationAction = {}));\nvar StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n StorageAction[\"GetDataAccess\"] = \"8\";\n StorageAction[\"ListCallerAccessGrants\"] = \"9\";\n})(StorageAction = exports.StorageAction || (exports.StorageAction = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AAEvU,CAAC,UAAU,SAAS,EAAE;AACtB;AACA,IAAI,SAAS,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC;AAClC,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;AAC7B,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;AAC9B,IAAI,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;AAC/B,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;AAC7B,IAAI,SAAS,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAC5B,IAA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B,OAAO,CAAC,aAAa,KAAK,OAAO,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC;;"}
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/Platform/types.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InteractionsAction = exports.InAppMessagingAction = exports.GeoAction = exports.DataStoreAction = exports.AuthAction = exports.ApiAction = exports.AnalyticsAction = exports.Category = exports.Framework = void 0;\nvar Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework = exports.Framework || (exports.Framework = {}));\nvar Category;\n(function (Category) {\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category = exports.Category || (exports.Category = {}));\nvar AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction = exports.AnalyticsAction || (exports.AnalyticsAction = {}));\nvar ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction = exports.ApiAction || (exports.ApiAction = {}));\nvar AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n})(AuthAction = exports.AuthAction || (exports.AuthAction = {}));\nvar DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction = exports.DataStoreAction || (exports.DataStoreAction = {}));\nvar GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction = exports.GeoAction || (exports.GeoAction = {}));\nvar InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction = exports.InAppMessagingAction || (exports.InAppMessagingAction = {}));\nvar InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction = exports.InteractionsAction || (exports.InteractionsAction = {}));\nvar PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction = exports.PredictionsAction || (exports.PredictionsAction = {}));\nvar PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction = exports.PubSubAction || (exports.PubSubAction = {}));\nvar PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction = exports.PushNotificationAction || (exports.PushNotificationAction = {}));\nvar StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n})(StorageAction = exports.StorageAction || (exports.StorageAction = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AAEvU,CAAC,UAAU,SAAS,EAAE;AACtB;AACA,IAAI,SAAS,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC;AAClC,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;AAC7B,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;AAC9B,IAAI,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;AAC/B,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;AAC7B,IAAI,SAAS,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAC5B,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;AAC9B;AACA,IAAI,SAAS,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC;AAC3C,IAAI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C,IAAI,iBAAiB,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC;AACzC,CAAC,EAAsB,OAAO,CAAC,iBAAiB,KAAK,OAAO,CAAC,iBAAiB,GAAG,EAAE,CAAC,CAAC,CAAC;AAEtF,CAAC,UAAU,YAAY,EAAE;AACzB,IAAI,YAAY,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC;AACpC,CAAC,EAAiB,OAAO,CAAC,YAAY,KAAK,OAAO,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC;AAEvE,CAAC,UAAU,sBAAsB,EAAE;AACnC,IAAI,sBAAsB,CAAC,6BAA6B,CAAC,GAAG,GAAG,CAAC;AAChE,IAAI,sBAAsB,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC;AACjD,CAAC,EAA2B,OAAO,CAAC,sBAAsB,KAAK,OAAO,CAAC,sBAAsB,GAAG,EAAE,CAAC,CAAC,CAAC;AAErG,CAAC,UAAU,aAAa,EAAE;AAC1B,IAAI,aAAa,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC;AACtC,IAAI,aAAa,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC;AACxC,IAAI,aAAa,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAChC,IAAI,aAAa,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAChC,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;AAClC,IAAI,aAAa,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC;AACzC,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;AAClC,CAAC,EAAkB,OAAO,CAAC,aAAa,KAAK,OAAO,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.version = void 0;
|
|
5
5
|
// generated by genversion
|
|
6
|
-
exports.version = '6.5.2-
|
|
6
|
+
exports.version = '6.5.2-unstable.5224dc2.0+5224dc2';
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.5.2-
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.5.2-unstable.5224dc2.0+5224dc2';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,kCAAkC;;"}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchTransferHandler = void 0;
|
|
7
|
+
const errors_1 = require("../../errors");
|
|
7
8
|
const memoization_1 = require("../utils/memoization");
|
|
9
|
+
const types_1 = require("../../types");
|
|
8
10
|
const shouldSendBody = (method) => !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());
|
|
9
11
|
// TODO[AllanZhengYP]: we need to provide isCanceledError utility
|
|
10
12
|
const fetchTransferHandler = async ({ url, method, headers, body }, { abortSignal, cache, withCrossDomainCredentials }) => {
|
|
@@ -20,11 +22,12 @@ const fetchTransferHandler = async ({ url, method, headers, body }, { abortSigna
|
|
|
20
22
|
});
|
|
21
23
|
}
|
|
22
24
|
catch (e) {
|
|
23
|
-
// TODO: needs to revise error handling in v6
|
|
24
|
-
// For now this is a thin wrapper over original fetch error similar to cognito-identity-js package.
|
|
25
|
-
// Ref: https://github.com/aws-amplify/amplify-js/blob/4fbc8c0a2be7526aab723579b4c95b552195a80b/packages/amazon-cognito-identity-js/src/Client.js#L103-L108
|
|
26
25
|
if (e instanceof TypeError) {
|
|
27
|
-
throw new
|
|
26
|
+
throw new errors_1.AmplifyError({
|
|
27
|
+
name: types_1.AmplifyErrorCode.NetworkError,
|
|
28
|
+
message: 'A network error has occurred.',
|
|
29
|
+
underlyingError: e,
|
|
30
|
+
});
|
|
28
31
|
}
|
|
29
32
|
throw e;
|
|
30
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.js","sources":["../../../../src/clients/handlers/fetch.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchTransferHandler = void 0;\nconst memoization_1 = require(\"../utils/memoization\");\nconst shouldSendBody = (method) => !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());\n// TODO[AllanZhengYP]: we need to provide isCanceledError utility\nconst fetchTransferHandler = async ({ url, method, headers, body }, { abortSignal, cache, withCrossDomainCredentials }) => {\n let resp;\n try {\n resp = await fetch(url, {\n method,\n headers,\n body: shouldSendBody(method) ? body : undefined,\n signal: abortSignal,\n cache,\n credentials: withCrossDomainCredentials ? 'include' : 'same-origin',\n });\n }\n catch (e) {\n
|
|
1
|
+
{"version":3,"file":"fetch.js","sources":["../../../../src/clients/handlers/fetch.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchTransferHandler = void 0;\nconst errors_1 = require(\"../../errors\");\nconst memoization_1 = require(\"../utils/memoization\");\nconst types_1 = require(\"../../types\");\nconst shouldSendBody = (method) => !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());\n// TODO[AllanZhengYP]: we need to provide isCanceledError utility\nconst fetchTransferHandler = async ({ url, method, headers, body }, { abortSignal, cache, withCrossDomainCredentials }) => {\n let resp;\n try {\n resp = await fetch(url, {\n method,\n headers,\n body: shouldSendBody(method) ? body : undefined,\n signal: abortSignal,\n cache,\n credentials: withCrossDomainCredentials ? 'include' : 'same-origin',\n });\n }\n catch (e) {\n if (e instanceof TypeError) {\n throw new errors_1.AmplifyError({\n name: types_1.AmplifyErrorCode.NetworkError,\n message: 'A network error has occurred.',\n underlyingError: e,\n });\n }\n throw e;\n }\n const responseHeaders = {};\n resp.headers?.forEach((value, key) => {\n responseHeaders[key.toLowerCase()] = value;\n });\n const httpResponse = {\n statusCode: resp.status,\n headers: responseHeaders,\n body: null,\n };\n // resp.body is a ReadableStream according to Fetch API spec, but React Native\n // does not implement it.\n const bodyWithMixin = Object.assign(resp.body ?? {}, {\n text: (0, memoization_1.withMemoization)(() => resp.text()),\n blob: (0, memoization_1.withMemoization)(() => resp.blob()),\n json: (0, memoization_1.withMemoization)(() => resp.json()),\n });\n return {\n ...httpResponse,\n body: bodyWithMixin,\n };\n};\nexports.fetchTransferHandler = fetchTransferHandler;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,oBAAoB,GAAG,KAAK,CAAC,CAAC;AACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AACzC,MAAM,aAAa,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AACtD,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACvC,MAAM,cAAc,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7F;AACA,MAAM,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C,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE;AACzD,QAAQ,IAAI,EAAE,IAAI,aAAa,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;AACnE,QAAQ,IAAI,EAAE,IAAI,aAAa,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;AACnE,QAAQ,IAAI,EAAE,IAAI,aAAa,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;AACnE,KAAK,CAAC,CAAC;AACP,IAAI,OAAO;AACX,QAAQ,GAAG,YAAY;AACvB,QAAQ,IAAI,EAAE,aAAa;AAC3B,KAAK,CAAC;AACN,CAAC,CAAC;AACF,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;;"}
|
|
@@ -15,13 +15,10 @@ const getRetryDecider = (errorParser) => async (response, error) => {
|
|
|
15
15
|
undefined;
|
|
16
16
|
const errorCode = parsedError?.code || parsedError?.name;
|
|
17
17
|
const statusCode = response?.statusCode;
|
|
18
|
-
|
|
18
|
+
return (isConnectionError(error) ||
|
|
19
19
|
isThrottlingError(statusCode, errorCode) ||
|
|
20
20
|
(0, isClockSkewError_1.isClockSkewError)(errorCode) ||
|
|
21
|
-
isServerSideError(statusCode, errorCode);
|
|
22
|
-
return {
|
|
23
|
-
retryable: isRetryable,
|
|
24
|
-
};
|
|
21
|
+
isServerSideError(statusCode, errorCode));
|
|
25
22
|
};
|
|
26
23
|
exports.getRetryDecider = getRetryDecider;
|
|
27
24
|
// reference: https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L22-L37
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultRetryDecider.js","sources":["../../../../../src/clients/middleware/retry/defaultRetryDecider.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRetryDecider = void 0;\nconst isClockSkewError_1 = require(\"./isClockSkewError\");\n/**\n * Get retry decider function\n * @param errorParser Function to load JavaScript error from HTTP response\n */\nconst getRetryDecider = (errorParser) => async (response, error) => {\n const parsedError = error ??\n (await errorParser(response)) ??\n undefined;\n const errorCode = parsedError?.code || parsedError?.name;\n const statusCode = response?.statusCode;\n
|
|
1
|
+
{"version":3,"file":"defaultRetryDecider.js","sources":["../../../../../src/clients/middleware/retry/defaultRetryDecider.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRetryDecider = void 0;\nconst isClockSkewError_1 = require(\"./isClockSkewError\");\n/**\n * Get retry decider function\n * @param errorParser Function to load JavaScript error from HTTP response\n */\nconst getRetryDecider = (errorParser) => async (response, error) => {\n const parsedError = error ??\n (await errorParser(response)) ??\n undefined;\n const errorCode = parsedError?.code || parsedError?.name;\n const statusCode = response?.statusCode;\n return (isConnectionError(error) ||\n isThrottlingError(statusCode, errorCode) ||\n (0, isClockSkewError_1.isClockSkewError)(errorCode) ||\n isServerSideError(statusCode, errorCode));\n};\nexports.getRetryDecider = getRetryDecider;\n// reference: https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L22-L37\nconst THROTTLING_ERROR_CODES = [\n 'BandwidthLimitExceeded',\n 'EC2ThrottledException',\n 'LimitExceededException',\n 'PriorRequestNotComplete',\n 'ProvisionedThroughputExceededException',\n 'RequestLimitExceeded',\n 'RequestThrottled',\n 'RequestThrottledException',\n 'SlowDown',\n 'ThrottledException',\n 'Throttling',\n 'ThrottlingException',\n 'TooManyRequestsException',\n];\nconst TIMEOUT_ERROR_CODES = [\n 'TimeoutError',\n 'RequestTimeout',\n 'RequestTimeoutException',\n];\nconst isThrottlingError = (statusCode, errorCode) => statusCode === 429 ||\n (!!errorCode && THROTTLING_ERROR_CODES.includes(errorCode));\nconst isConnectionError = (error) => error?.name === 'Network error';\nconst isServerSideError = (statusCode, errorCode) => (!!statusCode && [500, 502, 503, 504].includes(statusCode)) ||\n (!!errorCode && TIMEOUT_ERROR_CODES.includes(errorCode));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,eAAe,GAAG,KAAK,CAAC,CAAC;AACjC,MAAM,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AACzD;AACA;AACA;AACA;AACA,MAAM,eAAe,GAAG,CAAC,WAAW,KAAK,OAAO,QAAQ,EAAE,KAAK,KAAK;AACpE,IAAI,MAAM,WAAW,GAAG,KAAK;AAC7B,SAAS,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC;AACrC,QAAQ,SAAS,CAAC;AAClB,IAAI,MAAM,SAAS,GAAG,WAAW,EAAE,IAAI,IAAI,WAAW,EAAE,IAAI,CAAC;AAC7D,IAAI,MAAM,UAAU,GAAG,QAAQ,EAAE,UAAU,CAAC;AAC5C,IAAI,QAAQ,iBAAiB,CAAC,KAAK,CAAC;AACpC,QAAQ,iBAAiB,CAAC,UAAU,EAAE,SAAS,CAAC;AAChD,QAAQ,IAAI,kBAAkB,CAAC,gBAAgB,EAAE,SAAS,CAAC;AAC3D,QAAQ,iBAAiB,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE;AAClD,CAAC,CAAC;AACF,OAAO,CAAC,eAAe,GAAG,eAAe,CAAC;AAC1C;AACA,MAAM,sBAAsB,GAAG;AAC/B,IAAI,wBAAwB;AAC5B,IAAI,uBAAuB;AAC3B,IAAI,wBAAwB;AAC5B,IAAI,yBAAyB;AAC7B,IAAI,wCAAwC;AAC5C,IAAI,sBAAsB;AAC1B,IAAI,kBAAkB;AACtB,IAAI,2BAA2B;AAC/B,IAAI,UAAU;AACd,IAAI,oBAAoB;AACxB,IAAI,YAAY;AAChB,IAAI,qBAAqB;AACzB,IAAI,0BAA0B;AAC9B,CAAC,CAAC;AACF,MAAM,mBAAmB,GAAG;AAC5B,IAAI,cAAc;AAClB,IAAI,gBAAgB;AACpB,IAAI,yBAAyB;AAC7B,CAAC,CAAC;AACF,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,SAAS,KAAK,UAAU,KAAK,GAAG;AACvE,KAAK,CAAC,CAAC,SAAS,IAAI,sBAAsB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;AAChE,MAAM,iBAAiB,GAAG,CAAC,KAAK,KAAK,KAAK,EAAE,IAAI,KAAK,eAAe,CAAC;AACrE,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,SAAS,KAAK,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;AAC/G,KAAK,CAAC,CAAC,SAAS,IAAI,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;;"}
|
|
@@ -42,10 +42,7 @@ const retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDec
|
|
|
42
42
|
? (context.attemptsCount ?? 0)
|
|
43
43
|
: attemptsCount + 1;
|
|
44
44
|
context.attemptsCount = attemptsCount;
|
|
45
|
-
|
|
46
|
-
if (retryable) {
|
|
47
|
-
// Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.
|
|
48
|
-
context.isCredentialsExpired = !!isCredentialsExpiredError;
|
|
45
|
+
if (await retryDecider(response, error)) {
|
|
49
46
|
if (!abortSignal?.aborted && attemptsCount < maxAttempts) {
|
|
50
47
|
// prevent sleep for last attempt or cancelled request;
|
|
51
48
|
const delay = computeDelay(attemptsCount);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sources":["../../../../../src/clients/middleware/retry/middleware.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryMiddlewareFactory = void 0;\nconst DEFAULT_RETRY_ATTEMPTS = 3;\n/**\n * Retry middleware\n */\nconst retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDecider, computeDelay, abortSignal, }) => {\n if (maxAttempts < 1) {\n throw new Error('maxAttempts must be greater than 0');\n }\n return (next, context) => async function retryMiddleware(request) {\n let error;\n let attemptsCount = context.attemptsCount ?? 0;\n let response;\n // When retry is not needed or max attempts is reached, either error or response will be set. This function handles either cases.\n const handleTerminalErrorOrResponse = () => {\n if (response) {\n addOrIncrementMetadataAttempts(response, attemptsCount);\n return response;\n }\n else {\n addOrIncrementMetadataAttempts(error, attemptsCount);\n throw error;\n }\n };\n while (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n try {\n response = await next(request);\n error = undefined;\n }\n catch (e) {\n error = e;\n response = undefined;\n }\n // context.attemptsCount may be updated after calling next handler which may retry the request by itself.\n attemptsCount =\n (context.attemptsCount ?? 0) > attemptsCount\n ? (context.attemptsCount ?? 0)\n : attemptsCount + 1;\n context.attemptsCount = attemptsCount;\n
|
|
1
|
+
{"version":3,"file":"middleware.js","sources":["../../../../../src/clients/middleware/retry/middleware.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryMiddlewareFactory = void 0;\nconst DEFAULT_RETRY_ATTEMPTS = 3;\n/**\n * Retry middleware\n */\nconst retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDecider, computeDelay, abortSignal, }) => {\n if (maxAttempts < 1) {\n throw new Error('maxAttempts must be greater than 0');\n }\n return (next, context) => async function retryMiddleware(request) {\n let error;\n let attemptsCount = context.attemptsCount ?? 0;\n let response;\n // When retry is not needed or max attempts is reached, either error or response will be set. This function handles either cases.\n const handleTerminalErrorOrResponse = () => {\n if (response) {\n addOrIncrementMetadataAttempts(response, attemptsCount);\n return response;\n }\n else {\n addOrIncrementMetadataAttempts(error, attemptsCount);\n throw error;\n }\n };\n while (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n try {\n response = await next(request);\n error = undefined;\n }\n catch (e) {\n error = e;\n response = undefined;\n }\n // context.attemptsCount may be updated after calling next handler which may retry the request by itself.\n attemptsCount =\n (context.attemptsCount ?? 0) > attemptsCount\n ? (context.attemptsCount ?? 0)\n : attemptsCount + 1;\n context.attemptsCount = attemptsCount;\n if (await retryDecider(response, error)) {\n if (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n // prevent sleep for last attempt or cancelled request;\n const delay = computeDelay(attemptsCount);\n await cancellableSleep(delay, abortSignal);\n }\n continue;\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n }\n if (abortSignal?.aborted) {\n throw new Error('Request aborted.');\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n };\n};\nexports.retryMiddlewareFactory = retryMiddlewareFactory;\nconst cancellableSleep = (timeoutMs, abortSignal) => {\n if (abortSignal?.aborted) {\n return Promise.resolve();\n }\n let timeoutId;\n let sleepPromiseResolveFn;\n const sleepPromise = new Promise(resolve => {\n sleepPromiseResolveFn = resolve;\n timeoutId = setTimeout(resolve, timeoutMs);\n });\n abortSignal?.addEventListener('abort', function cancelSleep(_) {\n clearTimeout(timeoutId);\n abortSignal?.removeEventListener('abort', cancelSleep);\n sleepPromiseResolveFn();\n });\n return sleepPromise;\n};\nconst addOrIncrementMetadataAttempts = (nextHandlerOutput, attempts) => {\n if (Object.prototype.toString.call(nextHandlerOutput) !== '[object Object]') {\n return;\n }\n nextHandlerOutput.$metad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,GAAG,IAAI,OAAO,CAAC,OAAO,IAAI;AAChD,QAAQ,qBAAqB,GAAG,OAAO,CAAC;AACxC,QAAQ,SAAS,GAAG,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,IAAI,WAAW,EAAE,gBAAgB,CAAC,OAAO,EAAE,SAAS,WAAW,CAAC,CAAC,EAAE;AACnE,QAAQ,YAAY,CAAC,SAAS,CAAC,CAAC;AAChC,QAAQ,WAAW,EAAE,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAC/D,QAAQ,qBAAqB,EAAE,CAAC;AAChC,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,YAAY,CAAC;AACxB,CAAC,CAAC;AACF,MAAM,8BAA8B,GAAG,CAAC,iBAAiB,EAAE,QAAQ,KAAK;AACxE,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,iBAAiB,EAAE;AACjF,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,iBAAiB,CAAC,SAAS,GAAG;AAClC,QAAQ,IAAI,iBAAiB,CAAC,SAAS,IAAI,EAAE,CAAC;AAC9C,QAAQ,QAAQ;AAChB,KAAK,CAAC;AACN,CAAC;;"}
|
|
@@ -13,14 +13,10 @@ const getUpdatedSystemClockOffset_1 = require("./utils/getUpdatedSystemClockOffs
|
|
|
13
13
|
*/
|
|
14
14
|
const signingMiddlewareFactory = ({ credentials, region, service, uriEscapePath = true, }) => {
|
|
15
15
|
let currentSystemClockOffset;
|
|
16
|
-
return (next
|
|
16
|
+
return (next) => async function signingMiddleware(request) {
|
|
17
17
|
currentSystemClockOffset = currentSystemClockOffset ?? 0;
|
|
18
18
|
const signRequestOptions = {
|
|
19
|
-
credentials: typeof credentials === 'function'
|
|
20
|
-
? await credentials({
|
|
21
|
-
forceRefresh: !!context?.isCredentialsExpired,
|
|
22
|
-
})
|
|
23
|
-
: credentials,
|
|
19
|
+
credentials: typeof credentials === 'function' ? await credentials() : credentials,
|
|
24
20
|
signingDate: (0, getSkewCorrectedDate_1.getSkewCorrectedDate)(currentSystemClockOffset),
|
|
25
21
|
signingRegion: region,
|
|
26
22
|
signingService: service,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sources":["../../../../../src/clients/middleware/signing/middleware.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.signingMiddlewareFactory = void 0;\nconst signatureV4_1 = require(\"./signer/signatureV4\");\nconst getSkewCorrectedDate_1 = require(\"./utils/getSkewCorrectedDate\");\nconst getUpdatedSystemClockOffset_1 = require(\"./utils/getUpdatedSystemClockOffset\");\n/**\n * Middleware that SigV4 signs request with AWS credentials, and correct system clock offset.\n * This middleware is expected to be placed after retry middleware.\n */\nconst signingMiddlewareFactory = ({ credentials, region, service, uriEscapePath = true, }) => {\n let currentSystemClockOffset;\n return (next
|
|
1
|
+
{"version":3,"file":"middleware.js","sources":["../../../../../src/clients/middleware/signing/middleware.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.signingMiddlewareFactory = void 0;\nconst signatureV4_1 = require(\"./signer/signatureV4\");\nconst getSkewCorrectedDate_1 = require(\"./utils/getSkewCorrectedDate\");\nconst getUpdatedSystemClockOffset_1 = require(\"./utils/getUpdatedSystemClockOffset\");\n/**\n * Middleware that SigV4 signs request with AWS credentials, and correct system clock offset.\n * This middleware is expected to be placed after retry middleware.\n */\nconst signingMiddlewareFactory = ({ credentials, region, service, uriEscapePath = true, }) => {\n let currentSystemClockOffset;\n return (next) => async function signingMiddleware(request) {\n currentSystemClockOffset = currentSystemClockOffset ?? 0;\n const signRequestOptions = {\n credentials: typeof credentials === 'function' ? await credentials() : credentials,\n signingDate: (0, getSkewCorrectedDate_1.getSkewCorrectedDate)(currentSystemClockOffset),\n signingRegion: region,\n signingService: service,\n uriEscapePath,\n };\n const signedRequest = await (0, signatureV4_1.signRequest)(request, signRequestOptions);\n const response = await next(signedRequest);\n // Update system clock offset if response contains date header, regardless of the status code.\n // non-2xx response will still be returned from next handler instead of thrown, because it's\n // only thrown by the retry middleware.\n const dateString = getDateHeader(response);\n if (dateString) {\n currentSystemClockOffset = (0, getUpdatedSystemClockOffset_1.getUpdatedSystemClockOffset)(Date.parse(dateString), currentSystemClockOffset);\n }\n return response;\n };\n};\nexports.signingMiddlewareFactory = signingMiddlewareFactory;\nconst getDateHeader = ({ headers } = {}) => headers?.date ?? headers?.Date ?? headers?.['x-amz-date'];\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,wBAAwB,GAAG,KAAK,CAAC,CAAC;AAC1C,MAAM,aAAa,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AACtD,MAAM,sBAAsB,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AACvE,MAAM,6BAA6B,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACrF;AACA;AACA;AACA;AACA,MAAM,wBAAwB,GAAG,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,GAAG,KAAK;AAC9F,IAAI,IAAI,wBAAwB,CAAC;AACjC,IAAI,OAAO,CAAC,IAAI,KAAK,eAAe,iBAAiB,CAAC,OAAO,EAAE;AAC/D,QAAQ,wBAAwB,GAAG,wBAAwB,IAAI,CAAC,CAAC;AACjE,QAAQ,MAAM,kBAAkB,GAAG;AACnC,YAAY,WAAW,EAAE,OAAO,WAAW,KAAK,UAAU,GAAG,MAAM,WAAW,EAAE,GAAG,WAAW;AAC9F,YAAY,WAAW,EAAE,IAAI,sBAAsB,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;AACnG,YAAY,aAAa,EAAE,MAAM;AACjC,YAAY,cAAc,EAAE,OAAO;AACnC,YAAY,aAAa;AACzB,SAAS,CAAC;AACV,QAAQ,MAAM,aAAa,GAAG,MAAM,IAAI,aAAa,CAAC,WAAW,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;AAChG,QAAQ,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC;AACnD;AACA;AACA;AACA,QAAQ,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;AACnD,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,wBAAwB,GAAG,IAAI,6BAA6B,CAAC,2BAA2B,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,wBAAwB,CAAC,CAAC;AACxJ,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK,CAAC;AACN,CAAC,CAAC;AACF,OAAO,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;AAC5D,MAAM,aAAa,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,IAAI,IAAI,OAAO,GAAG,YAAY,CAAC;;"}
|
|
@@ -16,6 +16,9 @@ const amplifyErrorMap = {
|
|
|
16
16
|
[types_1.AmplifyErrorCode.Unknown]: {
|
|
17
17
|
message: 'An unknown error occurred.',
|
|
18
18
|
},
|
|
19
|
+
[types_1.AmplifyErrorCode.NetworkError]: {
|
|
20
|
+
message: 'A network error has occurred.',
|
|
21
|
+
},
|
|
19
22
|
};
|
|
20
23
|
exports.assert = (0, createAssertionFunction_1.createAssertionFunction)(amplifyErrorMap);
|
|
21
24
|
//# sourceMappingURL=errorHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHelpers.js","sources":["../../../src/errors/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = void 0;\nconst types_1 = require(\"../types\");\nconst createAssertionFunction_1 = require(\"./createAssertionFunction\");\nconst amplifyErrorMap = {\n [types_1.AmplifyErrorCode.NoEndpointId]: {\n message: 'Endpoint ID was not found and was unable to be created.',\n },\n [types_1.AmplifyErrorCode.PlatformNotSupported]: {\n message: 'Function not supported on current platform.',\n },\n [types_1.AmplifyErrorCode.Unknown]: {\n message: 'An unknown error occurred.',\n },\n};\nexports.assert = (0, createAssertionFunction_1.createAssertionFunction)(amplifyErrorMap);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AACxB,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,yBAAyB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AACvE,MAAM,eAAe,GAAG;AACxB,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,GAAG;AAC7C,QAAQ,OAAO,EAAE,yDAAyD;AAC1E,KAAK;AACL,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,oBAAoB,GAAG;AACrD,QAAQ,OAAO,EAAE,6CAA6C;AAC9D,KAAK;AACL,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,GAAG;AACxC,QAAQ,OAAO,EAAE,4BAA4B;AAC7C,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,MAAM,GAAG,IAAI,yBAAyB,CAAC,uBAAuB,EAAE,eAAe,CAAC;;"}
|
|
1
|
+
{"version":3,"file":"errorHelpers.js","sources":["../../../src/errors/errorHelpers.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = void 0;\nconst types_1 = require(\"../types\");\nconst createAssertionFunction_1 = require(\"./createAssertionFunction\");\nconst amplifyErrorMap = {\n [types_1.AmplifyErrorCode.NoEndpointId]: {\n message: 'Endpoint ID was not found and was unable to be created.',\n },\n [types_1.AmplifyErrorCode.PlatformNotSupported]: {\n message: 'Function not supported on current platform.',\n },\n [types_1.AmplifyErrorCode.Unknown]: {\n message: 'An unknown error occurred.',\n },\n [types_1.AmplifyErrorCode.NetworkError]: {\n message: 'A network error has occurred.',\n },\n};\nexports.assert = (0, createAssertionFunction_1.createAssertionFunction)(amplifyErrorMap);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AACxB,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,yBAAyB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AACvE,MAAM,eAAe,GAAG;AACxB,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,GAAG;AAC7C,QAAQ,OAAO,EAAE,yDAAyD;AAC1E,KAAK;AACL,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,oBAAoB,GAAG;AACrD,QAAQ,OAAO,EAAE,6CAA6C;AAC9D,KAAK;AACL,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,GAAG;AACxC,QAAQ,OAAO,EAAE,4BAA4B;AAC7C,KAAK;AACL,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,GAAG;AAC7C,QAAQ,OAAO,EAAE,+BAA+B;AAChD,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,MAAM,GAAG,IAAI,yBAAyB,CAAC,uBAAuB,EAAE,eAAe,CAAC;;"}
|
|
@@ -31,6 +31,12 @@ function assertIdentityPoolIdConfig(cognitoConfig) {
|
|
|
31
31
|
(0, errorHelpers_1.assert)(validConfig, errorHelpers_1.AuthConfigurationErrorCode.InvalidIdentityPoolIdException);
|
|
32
32
|
}
|
|
33
33
|
exports.assertIdentityPoolIdConfig = assertIdentityPoolIdConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Decodes payload of JWT token
|
|
36
|
+
*
|
|
37
|
+
* @param {String} token A string representing a token to be decoded
|
|
38
|
+
* @throws {@link Error} - Throws error when token is invalid or payload malformed.
|
|
39
|
+
*/
|
|
34
40
|
function decodeJWT(token) {
|
|
35
41
|
const tokenParts = token.split('.');
|
|
36
42
|
if (tokenParts.length !== 3) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/singleton/Auth/utils/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeJWT = exports.assertIdentityPoolIdConfig = exports.assertOAuthConfig = exports.assertTokenProviderConfig = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst convert_1 = require(\"../../../utils/convert\");\nconst errorHelpers_1 = require(\"./errorHelpers\");\nfunction assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n (0, errorHelpers_1.assert)(assertionValid, errorHelpers_1.AuthConfigurationErrorCode.AuthUserPoolException);\n}\nexports.assertTokenProviderConfig = assertTokenProviderConfig;\nfunction assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n (0, errorHelpers_1.assert)(validOAuthConfig, errorHelpers_1.AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nexports.assertOAuthConfig = assertOAuthConfig;\nfunction assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n (0, errorHelpers_1.assert)(validConfig, errorHelpers_1.AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\nexports.assertIdentityPoolIdConfig = assertIdentityPoolIdConfig;\nfunction decodeJWT(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) {\n throw new Error('Invalid token');\n }\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent(convert_1.base64Decoder\n .convert(base64)\n .split('')\n .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: () => token,\n payload,\n };\n }\n catch (err) {\n throw new Error('Invalid token payload');\n }\n}\nexports.decodeJWT = decodeJWT;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,yBAAyB,GAAG,KAAK,CAAC,CAAC;AAChI;AACA;AACA,MAAM,SAAS,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACpD,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjD,SAAS,yBAAyB,CAAC,aAAa,EAAE;AAClD,IAAI,IAAI,cAAc,G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,KAAK,CAAC,GAAG,CAAC,CAAC;AACxC,IAAI,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;AACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;AACzC,KAAK;AACL,IAAI,IAAI;AACR,QAAQ,MAAM,iBAAiB,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAChD,QAAQ,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC/E,QAAQ,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC,aAAa;AAClE,aAAa,OAAO,CAAC,MAAM,CAAC;AAC5B,aAAa,KAAK,CAAC,EAAE,CAAC;AACtB,aAAa,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,aAAa,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,QAAQ,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC5C,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,MAAM,KAAK;AACjC,YAAY,OAAO;AACnB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;AACjD,KAAK;AACL,CAAC;AACD,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/singleton/Auth/utils/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decodeJWT = exports.assertIdentityPoolIdConfig = exports.assertOAuthConfig = exports.assertTokenProviderConfig = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst convert_1 = require(\"../../../utils/convert\");\nconst errorHelpers_1 = require(\"./errorHelpers\");\nfunction assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n (0, errorHelpers_1.assert)(assertionValid, errorHelpers_1.AuthConfigurationErrorCode.AuthUserPoolException);\n}\nexports.assertTokenProviderConfig = assertTokenProviderConfig;\nfunction assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n (0, errorHelpers_1.assert)(validOAuthConfig, errorHelpers_1.AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nexports.assertOAuthConfig = assertOAuthConfig;\nfunction assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n (0, errorHelpers_1.assert)(validConfig, errorHelpers_1.AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\nexports.assertIdentityPoolIdConfig = assertIdentityPoolIdConfig;\n/**\n * Decodes payload of JWT token\n *\n * @param {String} token A string representing a token to be decoded\n * @throws {@link Error} - Throws error when token is invalid or payload malformed.\n */\nfunction decodeJWT(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) {\n throw new Error('Invalid token');\n }\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent(convert_1.base64Decoder\n .convert(base64)\n .split('')\n .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: () => token,\n payload,\n };\n }\n catch (err) {\n throw new Error('Invalid token payload');\n }\n}\nexports.decodeJWT = decodeJWT;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,yBAAyB,GAAG,KAAK,CAAC,CAAC;AAChI;AACA;AACA,MAAM,SAAS,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACpD,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjD,SAAS,yBAAyB,CAAC,aAAa,EAAE;AAClD,IAAI,IAAI,cAAc,GAAG,IAAI,CAAC;AAC9B,IAAI,IAAI,CAAC,aAAa,EAAE;AACxB,QAAQ,cAAc,GAAG,KAAK,CAAC;AAC/B,KAAK;AACL,SAAS;AACT,QAAQ,cAAc;AACtB,YAAY,CAAC,CAAC,aAAa,CAAC,UAAU,IAAI,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC;AAC3E,KAAK;AACL,IAAI,IAAI,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,0BAA0B,CAAC,qBAAqB,CAAC,CAAC;AAChH,CAAC;AACD,OAAO,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;AAC9D,SAAS,iBAAiB,CAAC,aAAa,EAAE;AAC1C,IAAI,MAAM,gBAAgB,GAAG,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM;AACtE,QAAQ,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe;AAC1D,QAAQ,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc;AACzD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AE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,aAAa,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,QAAQ,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC5C,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,MAAM,KAAK;AACjC,YAAY,OAAO;AACnB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,GAAG,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;AACjD,KAAK;AACL,CAAC;AACD,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
|
|
@@ -6,6 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.fetchAuthSession = void 0;
|
|
7
7
|
const Amplify_1 = require("../Amplify");
|
|
8
8
|
const fetchAuthSession_1 = require("./internal/fetchAuthSession");
|
|
9
|
+
/**
|
|
10
|
+
* Fetch the auth session including the tokens and credentials if they are available. By default it
|
|
11
|
+
* does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh
|
|
12
|
+
* with `{ forceRefresh: true }` input.
|
|
13
|
+
*
|
|
14
|
+
* @param options - Options configuring the fetch behavior.
|
|
15
|
+
* @throws {@link AuthError} - Throws error when session information cannot be refreshed.
|
|
16
|
+
* @returns Promise<AuthSession>
|
|
17
|
+
*/
|
|
9
18
|
const fetchAuthSession = (options) => {
|
|
10
19
|
return (0, fetchAuthSession_1.fetchAuthSession)(Amplify_1.Amplify, options);
|
|
11
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAuthSession.js","sources":["../../../../src/singleton/apis/fetchAuthSession.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchAuthSession = void 0;\nconst Amplify_1 = require(\"../Amplify\");\nconst fetchAuthSession_1 = require(\"./internal/fetchAuthSession\");\nconst fetchAuthSession = (options) => {\n return (0, fetchAuthSession_1.fetchAuthSession)(Amplify_1.Amplify, options);\n};\nexports.fetchAuthSession = fetchAuthSession;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAClC,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACxC,MAAM,kBAAkB,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAClE,MAAM,gBAAgB,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,OAAO,IAAI,kBAAkB,CAAC,gBAAgB,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAChF,CAAC,CAAC;AACF,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;;"}
|
|
1
|
+
{"version":3,"file":"fetchAuthSession.js","sources":["../../../../src/singleton/apis/fetchAuthSession.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchAuthSession = void 0;\nconst Amplify_1 = require(\"../Amplify\");\nconst fetchAuthSession_1 = require(\"./internal/fetchAuthSession\");\n/**\n * Fetch the auth session including the tokens and credentials if they are available. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n * @throws {@link AuthError} - Throws error when session information cannot be refreshed.\n * @returns Promise<AuthSession>\n */\nconst fetchAuthSession = (options) => {\n return (0, fetchAuthSession_1.fetchAuthSession)(Amplify_1.Amplify, options);\n};\nexports.fetchAuthSession = fetchAuthSession;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAClC,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACxC,MAAM,kBAAkB,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,OAAO,IAAI,kBAAkB,CAAC,gBAAgB,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAChF,CAAC,CAAC;AACF,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;;"}
|
package/dist/cjs/types/errors.js
CHANGED
|
@@ -8,5 +8,6 @@ exports.AmplifyErrorCode = void 0;
|
|
|
8
8
|
AmplifyErrorCode["NoEndpointId"] = "NoEndpointId";
|
|
9
9
|
AmplifyErrorCode["PlatformNotSupported"] = "PlatformNotSupported";
|
|
10
10
|
AmplifyErrorCode["Unknown"] = "Unknown";
|
|
11
|
+
AmplifyErrorCode["NetworkError"] = "NetworkError";
|
|
11
12
|
})(exports.AmplifyErrorCode || (exports.AmplifyErrorCode = {}));
|
|
12
13
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../../src/types/errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AmplifyErrorCode = void 0;\nvar AmplifyErrorCode;\n(function (AmplifyErrorCode) {\n AmplifyErrorCode[\"NoEndpointId\"] = \"NoEndpointId\";\n AmplifyErrorCode[\"PlatformNotSupported\"] = \"PlatformNotSupported\";\n AmplifyErrorCode[\"Unknown\"] = \"Unknown\";\n})(AmplifyErrorCode = exports.AmplifyErrorCode || (exports.AmplifyErrorCode = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAElC,CAAC,UAAU,gBAAgB,EAAE;AAC7B,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;AACtD,IAAI,gBAAgB,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAAC;AACtE,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC5C,CAAC,EAAqB,OAAO,CAAC,gBAAgB,KAAK,OAAO,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC;;"}
|
|
1
|
+
{"version":3,"file":"errors.js","sources":["../../../src/types/errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AmplifyErrorCode = void 0;\nvar AmplifyErrorCode;\n(function (AmplifyErrorCode) {\n AmplifyErrorCode[\"NoEndpointId\"] = \"NoEndpointId\";\n AmplifyErrorCode[\"PlatformNotSupported\"] = \"PlatformNotSupported\";\n AmplifyErrorCode[\"Unknown\"] = \"Unknown\";\n AmplifyErrorCode[\"NetworkError\"] = \"NetworkError\";\n})(AmplifyErrorCode = exports.AmplifyErrorCode || (exports.AmplifyErrorCode = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAElC,CAAC,UAAU,gBAAgB,EAAE;AAC7B,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;AACtD,IAAI,gBAAgB,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAAC;AACtE,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC5C,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;AACtD,CAAC,EAAqB,OAAO,CAAC,gBAAgB,KAAK,OAAO,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -109,9 +109,7 @@ export declare enum StorageAction {
|
|
|
109
109
|
Copy = "4",
|
|
110
110
|
Remove = "5",
|
|
111
111
|
GetProperties = "6",
|
|
112
|
-
GetUrl = "7"
|
|
113
|
-
GetDataAccess = "8",
|
|
114
|
-
ListCallerAccessGrants = "9"
|
|
112
|
+
GetUrl = "7"
|
|
115
113
|
}
|
|
116
114
|
interface ActionMap {
|
|
117
115
|
[Category.Auth]: AuthAction;
|
|
@@ -128,8 +128,6 @@ var StorageAction;
|
|
|
128
128
|
StorageAction["Remove"] = "5";
|
|
129
129
|
StorageAction["GetProperties"] = "6";
|
|
130
130
|
StorageAction["GetUrl"] = "7";
|
|
131
|
-
StorageAction["GetDataAccess"] = "8";
|
|
132
|
-
StorageAction["ListCallerAccessGrants"] = "9";
|
|
133
131
|
})(StorageAction || (StorageAction = {}));
|
|
134
132
|
|
|
135
133
|
export { AnalyticsAction, ApiAction, AuthAction, Category, DataStoreAction, Framework, GeoAction, InAppMessagingAction, InteractionsAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../src/Platform/types.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework || (Framework = {}));\nexport var Category;\n(function (Category) {\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category || (Category = {}));\nexport var AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction || (AnalyticsAction = {}));\nexport var ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction || (ApiAction = {}));\nexport var AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n})(AuthAction || (AuthAction = {}));\nexport var DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction || (DataStoreAction = {}));\nexport var GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction || (GeoAction = {}));\nexport var InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction || (InAppMessagingAction = {}));\nexport var InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction || (InteractionsAction = {}));\nexport var PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction || (PredictionsAction = {}));\nexport var PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction || (PubSubAction = {}));\nexport var PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction || (PushNotificationAction = {}));\nexport var StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n StorageAction[\"GetDataAccess\"] = \"8\";\n StorageAction[\"ListCallerAccessGrants\"] = \"9\";\n})(StorageAction || (StorageAction = {}));\n"],"names":[],"mappings":"AAAA;AACA;AACU,IAAC,UAAU;AACrB,CAAC,UAAU,SAAS,EAAE;AACtB;AACA,IAAI,SAAS,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC;AAClC,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;AAC7B,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;AAC9B,IAAI,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;AAC/B,I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B,CAAC,GAAG,GAAG,CAAC;AAClD,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,EAAE,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"types.mjs","sources":["../../../src/Platform/types.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework || (Framework = {}));\nexport var Category;\n(function (Category) {\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category || (Category = {}));\nexport var AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction || (AnalyticsAction = {}));\nexport var ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction || (ApiAction = {}));\nexport var AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n})(AuthAction || (AuthAction = {}));\nexport var DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction || (DataStoreAction = {}));\nexport var GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction || (GeoAction = {}));\nexport var InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction || (InAppMessagingAction = {}));\nexport var InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction || (InteractionsAction = {}));\nexport var PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction || (PredictionsAction = {}));\nexport var PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction || (PubSubAction = {}));\nexport var PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction || (PushNotificationAction = {}));\nexport var StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n})(StorageAction || (StorageAction = {}));\n"],"names":[],"mappings":"AAAA;AACA;AACU,IAAC,UAAU;AACrB,CAAC,UAAU,SAAS,EAAE;AACtB;AACA,IAAI,SAAS,CAAC,YAA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,CAAC;AAClC,IAAI,aAAa,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC;AACzC,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;AAClC,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,EAAE,CAAC,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.5.2-
|
|
1
|
+
export declare const version = "6.5.2-unstable.5224dc2.0+5224dc2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.5.2-
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.5.2-unstable.5224dc2.0+5224dc2';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -14,7 +14,7 @@ export declare const defaultConfig: {
|
|
|
14
14
|
endpointResolver: ({ region }: EndpointResolverOptions) => {
|
|
15
15
|
url: URL;
|
|
16
16
|
};
|
|
17
|
-
retryDecider: (response?: HttpResponse | undefined, error?: unknown) => Promise<
|
|
17
|
+
retryDecider: (response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>;
|
|
18
18
|
computeDelay: (attempt: number) => number;
|
|
19
19
|
userAgentValue: string;
|
|
20
20
|
cache: string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { getDnsSuffix } from '../../clients/endpoints/getDnsSuffix.mjs';
|
|
2
|
+
import '../../types/errors.mjs';
|
|
3
|
+
import '../../errors/errorHelpers.mjs';
|
|
2
4
|
import { unauthenticatedHandler } from '../../clients/handlers/unauthenticated.mjs';
|
|
3
5
|
import { jitteredBackoff } from '../../clients/middleware/retry/jitteredBackoff.mjs';
|
|
4
6
|
import { getRetryDecider } from '../../clients/middleware/retry/defaultRetryDecider.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.mjs","sources":["../../../../src/awsClients/cognitoIdentity/base.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getDnsSuffix, parseJsonError, unauthenticatedHandler, } from '../../clients';\nimport { composeTransferHandler } from '../../clients/internal/composeTransferHandler';\nimport { getRetryDecider, jitteredBackoff, } from '../../clients/middleware/retry';\nimport { getAmplifyUserAgent } from '../../Platform';\nimport { observeFrameworkChanges } from '../../Platform/detectFramework';\nimport { AmplifyUrl } from '../../utils/amplifyUrl';\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst SERVICE_NAME = 'cognito-identity';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */\nconst endpointResolver = ({ region }) => ({\n url: new AmplifyUrl(`https://cognito-identity.${region}.${getDnsSuffix(region)}`),\n});\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nexport const cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n/**\n * @internal\n */\nexport const defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\nobserveFrameworkChanges(() => {\n defaultConfig.userAgentValue = getAmplifyUserAgent();\n});\n/**\n * @internal\n */\nexport const getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`,\n});\n/**\n * @internal\n */\nexport const buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.mjs","sources":["../../../../src/awsClients/cognitoIdentity/base.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getDnsSuffix, parseJsonError, unauthenticatedHandler, } from '../../clients';\nimport { composeTransferHandler } from '../../clients/internal/composeTransferHandler';\nimport { getRetryDecider, jitteredBackoff, } from '../../clients/middleware/retry';\nimport { getAmplifyUserAgent } from '../../Platform';\nimport { observeFrameworkChanges } from '../../Platform/detectFramework';\nimport { AmplifyUrl } from '../../utils/amplifyUrl';\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst SERVICE_NAME = 'cognito-identity';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */\nconst endpointResolver = ({ region }) => ({\n url: new AmplifyUrl(`https://cognito-identity.${region}.${getDnsSuffix(region)}`),\n});\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nexport const cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n/**\n * @internal\n */\nexport const defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\nobserveFrameworkChanges(() => {\n defaultConfig.userAgentValue = getAmplifyUserAgent();\n});\n/**\n * @internal\n */\nexport const getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`,\n});\n/**\n * @internal\n */\nexport const buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n"],"names":[],"mappings":";;;;;;;;;;;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AE,IAAI,MAAM;AAChE,IAAI,OAAO;AACX,IAAI,GAAG;AACP,IAAI,IAAI;AACR,IAAI,MAAM,EAAE,MAAM;AAClB,CAAC;;;;"}
|
|
@@ -9,7 +9,7 @@ export declare const getCredentialsForIdentity: (config: {
|
|
|
9
9
|
endpointResolver?: (((options: import("../../clients").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
10
10
|
url: URL;
|
|
11
11
|
})) | undefined;
|
|
12
|
-
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown
|
|
12
|
+
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>)) | undefined;
|
|
13
13
|
computeDelay?: ((attempt: number) => number) | undefined;
|
|
14
14
|
userAgentValue?: string | undefined;
|
|
15
15
|
cache?: "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCredentialsForIdentity.mjs","sources":["../../../../src/awsClients/cognitoIdentity/getCredentialsForIdentity.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseJsonBody, parseJsonError, parseMetadata, } from '../../clients';\nimport { composeServiceApi } from '../../clients/internal';\nimport { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders, } from './base';\nconst getCredentialsForIdentitySerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetCredentialsForIdentity');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getCredentialsForIdentityDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n Credentials: deserializeCredentials(body.Credentials),\n $metadata: parseMetadata(response),\n };\n }\n};\nconst deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {\n return {\n AccessKeyId,\n SecretKey,\n SessionToken,\n Expiration: Expiration && new Date(Expiration * 1000),\n };\n};\n/**\n * @internal\n */\nexport const getCredentialsForIdentity = composeServiceApi(cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, defaultConfig);\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getCredentialsForIdentity.mjs","sources":["../../../../src/awsClients/cognitoIdentity/getCredentialsForIdentity.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { parseJsonBody, parseJsonError, parseMetadata, } from '../../clients';\nimport { composeServiceApi } from '../../clients/internal';\nimport { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders, } from './base';\nconst getCredentialsForIdentitySerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetCredentialsForIdentity');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getCredentialsForIdentityDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n Credentials: deserializeCredentials(body.Credentials),\n $metadata: parseMetadata(response),\n };\n }\n};\nconst deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {\n return {\n AccessKeyId,\n SecretKey,\n SessionToken,\n Expiration: Expiration && new Date(Expiration * 1000),\n };\n};\n/**\n * @internal\n */\nexport const getCredentialsForIdentity = composeServiceApi(cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, defaultConfig);\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;AAIA,MAAM,mCAAmC,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK;AACjE,IAAI,MAAM,OAAO,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAClE,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACvC,IAAI,OAAO,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC,CAAC;AACF,MAAM,qCAAqC,GAAG,OAAO,QAAQ,KAAK;AAClE,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE;AACpC,QAAQ,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,QAAQ,CAAC,CAAC;AACrD,QAAQ,MAAM,KAAK,CAAC;AACpB,KAAK;AACL,SAAS;AACT,QAAQ,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;AACnD,QAAQ,OAAO;AACf,YAAY,UAAU,EAAE,IAAI,CAAC,UAAU;AACvC,YAAY,WAAW,EAAE,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC;AACjE,YAAY,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC;AAC9C,SAAS,CAAC;AACV,KAAK;AACL,CAAC,CAAC;AACF,MAAM,sBAAsB,GAAG,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,GAAG,GAAG,EAAE,KAAK;AAC/F,IAAI,OAAO;AACX,QAAQ,WAAW;AACnB,QAAQ,SAAS;AACjB,QAAQ,YAAY;AACpB,QAAQ,UAAU,EAAE,UAAU,IAAI,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;AAC7D,KAAK,CAAC;AACN,CAAC,CAAC;AACF;AACA;AACA;AACY,MAAC,yBAAyB,GAAG,iBAAiB,CAAC,8BAA8B,EAAE,mCAAmC,EAAE,qCAAqC,EAAE,aAAa;;;;"}
|
|
@@ -9,7 +9,7 @@ export declare const getId: (config: {
|
|
|
9
9
|
endpointResolver?: (((options: import("../../clients").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients").EndpointResolverOptions) => {
|
|
10
10
|
url: URL;
|
|
11
11
|
})) | undefined;
|
|
12
|
-
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown
|
|
12
|
+
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<boolean>)) | undefined;
|
|
13
13
|
computeDelay?: ((attempt: number) => number) | undefined;
|
|
14
14
|
userAgentValue?: string | undefined;
|
|
15
15
|
cache?: "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload" | undefined;
|