@aws-amplify/core 6.4.5 → 6.4.6-storage-browser-integrity.9563334.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 +2 -0
- 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/middleware/retry/defaultRetryDecider.js +5 -2
- package/dist/cjs/clients/middleware/retry/defaultRetryDecider.js.map +1 -1
- package/dist/cjs/clients/middleware/retry/middleware.js +4 -1
- package/dist/cjs/clients/middleware/retry/middleware.js.map +1 -1
- package/dist/cjs/clients/middleware/retry/types.js +6 -0
- package/dist/cjs/clients/middleware/retry/types.js.map +1 -0
- package/dist/cjs/clients/middleware/signing/middleware.js +6 -2
- package/dist/cjs/clients/middleware/signing/middleware.js.map +1 -1
- package/dist/esm/Platform/types.d.ts +3 -1
- package/dist/esm/Platform/types.mjs +2 -0
- 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/getCredentialsForIdentity.d.ts +1 -1
- package/dist/esm/awsClients/cognitoIdentity/getId.d.ts +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/index.d.ts +2 -2
- package/dist/esm/clients/middleware/retry/defaultRetryDecider.d.ts +2 -1
- package/dist/esm/clients/middleware/retry/defaultRetryDecider.mjs +5 -2
- package/dist/esm/clients/middleware/retry/defaultRetryDecider.mjs.map +1 -1
- package/dist/esm/clients/middleware/retry/index.d.ts +1 -0
- package/dist/esm/clients/middleware/retry/middleware.d.ts +3 -1
- package/dist/esm/clients/middleware/retry/middleware.mjs +4 -1
- package/dist/esm/clients/middleware/retry/middleware.mjs.map +1 -1
- package/dist/esm/clients/middleware/retry/types.d.ts +4 -0
- package/dist/esm/clients/middleware/retry/types.mjs +2 -0
- package/dist/esm/clients/middleware/retry/types.mjs.map +1 -0
- package/dist/esm/clients/middleware/signing/index.d.ts +1 -1
- package/dist/esm/clients/middleware/signing/middleware.d.ts +10 -2
- package/dist/esm/clients/middleware/signing/middleware.mjs +6 -2
- package/dist/esm/clients/middleware/signing/middleware.mjs.map +1 -1
- package/dist/esm/clients/types/core.d.ts +5 -0
- package/dist/esm/clients/types/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/Platform/types.ts +2 -0
- package/src/Platform/version.ts +1 -1
- package/src/clients/index.ts +6 -1
- package/src/clients/middleware/retry/defaultRetryDecider.ts +11 -4
- package/src/clients/middleware/retry/index.ts +1 -0
- package/src/clients/middleware/retry/middleware.ts +16 -2
- package/src/clients/middleware/retry/types.ts +7 -0
- package/src/clients/middleware/signing/index.ts +5 -1
- package/src/clients/middleware/signing/middleware.ts +21 -3
- package/src/clients/types/core.ts +5 -0
- package/src/clients/types/index.ts +1 -0
|
@@ -131,5 +131,7 @@ exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction =
|
|
|
131
131
|
StorageAction["Remove"] = "5";
|
|
132
132
|
StorageAction["GetProperties"] = "6";
|
|
133
133
|
StorageAction["GetUrl"] = "7";
|
|
134
|
+
StorageAction["GetDataAccess"] = "8";
|
|
135
|
+
StorageAction["ListCallerAccessGrants"] = "9";
|
|
134
136
|
})(exports.StorageAction || (exports.StorageAction = {}));
|
|
135
137
|
//# 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.AiAction = 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[\"AI\"] = \"ai\";\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 AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction = exports.AiAction || (exports.AiAction = {}));\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,QAAQ,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AAE1V,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,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AC,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;;"}
|
|
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.AiAction = 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[\"AI\"] = \"ai\";\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 AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction = exports.AiAction || (exports.AiAction = {}));\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,QAAQ,GAAG,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AAE1V,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,SAAS,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;AAClC,IAAI,SAAS,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;AACnC,IAAI,SAAS,CAAC,YAAY,CA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AAa,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,IAAI,aAAa,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC;AACzC,IAAI,aAAa,CAAC,wBAAwB,CAAC,GAAG,GAAG,CAAC;AAClD,CAAC,EAAkB,OAAO,CAAC,aAAa,KAAK,OAAO,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -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.6.
|
|
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.6.6-storage-browser-integrity.9563334.0+9563334';\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,mDAAmD;;"}
|
|
@@ -15,10 +15,13 @@ 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
|
+
const isRetryable = isConnectionError(error) ||
|
|
19
19
|
isThrottlingError(statusCode, errorCode) ||
|
|
20
20
|
(0, isClockSkewError_1.isClockSkewError)(errorCode) ||
|
|
21
|
-
isServerSideError(statusCode, errorCode)
|
|
21
|
+
isServerSideError(statusCode, errorCode);
|
|
22
|
+
return {
|
|
23
|
+
retryable: isRetryable,
|
|
24
|
+
};
|
|
22
25
|
};
|
|
23
26
|
exports.getRetryDecider = getRetryDecider;
|
|
24
27
|
// 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 const isRetryable = isConnectionError(error) ||\n isThrottlingError(statusCode, errorCode) ||\n (0, isClockSkewError_1.isClockSkewError)(errorCode) ||\n isServerSideError(statusCode, errorCode);\n return {\n retryable: isRetryable,\n };\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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,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,7 +42,10 @@ const retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDec
|
|
|
42
42
|
? (context.attemptsCount ?? 0)
|
|
43
43
|
: attemptsCount + 1;
|
|
44
44
|
context.attemptsCount = attemptsCount;
|
|
45
|
-
|
|
45
|
+
const { isCredentialsExpiredError, retryable } = await retryDecider(response, error, context);
|
|
46
|
+
if (retryable) {
|
|
47
|
+
// Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.
|
|
48
|
+
context.isCredentialsExpired = !!isCredentialsExpiredError;
|
|
46
49
|
if (!abortSignal?.aborted && attemptsCount < maxAttempts) {
|
|
47
50
|
// prevent sleep for last attempt or cancelled request;
|
|
48
51
|
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 const { isCredentialsExpiredError, retryable } = await retryDecider(response, error, context);\n if (retryable) {\n // Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.\n context.isCredentialsExpired = !!isCredentialsExpiredError;\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.$metadata = {\n ...(nextHandlerOutput.$metadata ?? {}),\n attempts,\n };\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,sBAAsB,GAAG,KAAK,CAAC,CAAC;AACxC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC;AACA;AACA;AACA,MAAM,sBAAsB,GAAG,CAAC,EAAE,WAAW,GAAG,sBAAsB,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,GAAG,KAAK;AACvH,IAAI,IAAI,WAAW,GAAG,CAAC,EAAE;AACz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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;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../../src/clients/middleware/retry/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 });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -13,10 +13,14 @@ const getUpdatedSystemClockOffset_1 = require("./utils/getUpdatedSystemClockOffs
|
|
|
13
13
|
*/
|
|
14
14
|
const signingMiddlewareFactory = ({ credentials, region, service, uriEscapePath = true, }) => {
|
|
15
15
|
let currentSystemClockOffset;
|
|
16
|
-
return (next) => async function signingMiddleware(request) {
|
|
16
|
+
return (next, context) => async function signingMiddleware(request) {
|
|
17
17
|
currentSystemClockOffset = currentSystemClockOffset ?? 0;
|
|
18
18
|
const signRequestOptions = {
|
|
19
|
-
credentials: typeof credentials === 'function'
|
|
19
|
+
credentials: typeof credentials === 'function'
|
|
20
|
+
? await credentials({
|
|
21
|
+
forceRefresh: !!context?.isCredentialsExpired,
|
|
22
|
+
})
|
|
23
|
+
: credentials,
|
|
20
24
|
signingDate: (0, getSkewCorrectedDate_1.getSkewCorrectedDate)(currentSystemClockOffset),
|
|
21
25
|
signingRegion: region,
|
|
22
26
|
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) => async function signingMiddleware(request) {\n currentSystemClockOffset = currentSystemClockOffset ?? 0;\n const signRequestOptions = {\n credentials: typeof credentials === 'function'
|
|
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, context) => async function signingMiddleware(request) {\n currentSystemClockOffset = currentSystemClockOffset ?? 0;\n const signRequestOptions = {\n credentials: typeof credentials === 'function'\n ? await credentials({\n forceRefresh: !!context?.isCredentialsExpired,\n })\n : 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,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|
Remove = "5",
|
|
123
123
|
GetProperties = "6",
|
|
124
|
-
GetUrl = "7"
|
|
124
|
+
GetUrl = "7",
|
|
125
|
+
GetDataAccess = "8",
|
|
126
|
+
ListCallerAccessGrants = "9"
|
|
125
127
|
}
|
|
126
128
|
interface ActionMap {
|
|
127
129
|
[Category.AI]: AiAction;
|
|
@@ -141,6 +141,8 @@ var StorageAction;
|
|
|
141
141
|
StorageAction["Remove"] = "5";
|
|
142
142
|
StorageAction["GetProperties"] = "6";
|
|
143
143
|
StorageAction["GetUrl"] = "7";
|
|
144
|
+
StorageAction["GetDataAccess"] = "8";
|
|
145
|
+
StorageAction["ListCallerAccessGrants"] = "9";
|
|
144
146
|
})(StorageAction || (StorageAction = {}));
|
|
145
147
|
|
|
146
148
|
export { AiAction, 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[\"AI\"] = \"ai\";\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 AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction || (AiAction = {}));\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,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,C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Ac;AACzB,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,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[\"AI\"] = \"ai\";\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 AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction || (AiAction = {}));\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,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,SAAS,CAAC,UAAU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AC,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,IAAI,aAAa,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC;AACzC,IAAI,aAAa,CAAC,wBAAwB,CAAC,GAAG,GAAG,CAAC;AAClD,CAAC,EAAE,aAAa,KAAK,aAAa,GAAG,EAAE,CAAC,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.6.
|
|
1
|
+
export declare const version = "6.6.6-storage-browser-integrity.9563334.0+9563334";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.6.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.6.6-storage-browser-integrity.9563334.0+9563334';\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<import("../../clients").RetryDeciderOutput>;
|
|
18
18
|
computeDelay: (attempt: number) => number;
|
|
19
19
|
userAgentValue: string;
|
|
20
20
|
cache: string;
|
|
@@ -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) => Promise<
|
|
12
|
+
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("../../clients").MiddlewareContext | undefined) => Promise<import("../../clients").RetryDeciderOutput>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<import("../../clients").RetryDeciderOutput>)) | 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;
|
|
@@ -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) => Promise<
|
|
12
|
+
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("../../clients").MiddlewareContext | undefined) => Promise<import("../../clients").RetryDeciderOutput>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<import("../../clients").RetryDeciderOutput>)) | 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;
|
|
@@ -7,7 +7,7 @@ export declare const defaultConfig: {
|
|
|
7
7
|
endpointResolver: ({ region }: EndpointResolverOptions) => {
|
|
8
8
|
url: URL;
|
|
9
9
|
};
|
|
10
|
-
retryDecider: (response?: import("../../clients/types").HttpResponse | undefined, error?: unknown) => Promise<
|
|
10
|
+
retryDecider: (response?: import("../../clients/types").HttpResponse | undefined, error?: unknown) => Promise<import("../../clients/middleware/retry").RetryDeciderOutput>;
|
|
11
11
|
computeDelay: (attempt: number) => number;
|
|
12
12
|
userAgentValue: string;
|
|
13
13
|
};
|
|
@@ -9,7 +9,7 @@ export declare const getInAppMessages: (config: {
|
|
|
9
9
|
endpointResolver?: (((options: import("../../clients/types").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
10
10
|
url: URL;
|
|
11
11
|
})) | undefined;
|
|
12
|
-
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown) => Promise<
|
|
12
|
+
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("../../clients/types").MiddlewareContext | undefined) => Promise<import("../../clients").RetryDeciderOutput>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<import("../../clients").RetryDeciderOutput>)) | undefined;
|
|
13
13
|
computeDelay?: ((attempt: number) => number) | undefined;
|
|
14
14
|
userAgentValue?: string | undefined;
|
|
15
15
|
} & {
|
|
@@ -19,6 +19,6 @@ export declare const getInAppMessages: (config: {
|
|
|
19
19
|
maxAttempts?: number | undefined;
|
|
20
20
|
userAgentHeader?: string | undefined;
|
|
21
21
|
uriEscapePath?: boolean | undefined;
|
|
22
|
-
credentials: import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity | (() => Promise<import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity>);
|
|
22
|
+
credentials: import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity | ((options?: import("../../clients").CredentialsProviderOptions | undefined) => Promise<import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity>);
|
|
23
23
|
region: string;
|
|
24
24
|
}, input: import("./types").GetInAppMessagesRequest) => Promise<GetInAppMessagesOutput>;
|
|
@@ -9,7 +9,7 @@ export declare const putEvents: (config: {
|
|
|
9
9
|
endpointResolver?: (((options: import("../../clients/types").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
10
10
|
url: URL;
|
|
11
11
|
})) | undefined;
|
|
12
|
-
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown) => Promise<
|
|
12
|
+
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("../../clients/types").MiddlewareContext | undefined) => Promise<import("../../clients").RetryDeciderOutput>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<import("../../clients").RetryDeciderOutput>)) | undefined;
|
|
13
13
|
computeDelay?: ((attempt: number) => number) | undefined;
|
|
14
14
|
userAgentValue?: string | undefined;
|
|
15
15
|
} & {
|
|
@@ -19,6 +19,6 @@ export declare const putEvents: (config: {
|
|
|
19
19
|
maxAttempts?: number | undefined;
|
|
20
20
|
userAgentHeader?: string | undefined;
|
|
21
21
|
uriEscapePath?: boolean | undefined;
|
|
22
|
-
credentials: import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity | (() => Promise<import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity>);
|
|
22
|
+
credentials: import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity | ((options?: import("../../clients").CredentialsProviderOptions | undefined) => Promise<import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity>);
|
|
23
23
|
region: string;
|
|
24
24
|
}, input: import("./types").PutEventsRequest) => Promise<PutEventsOutput>;
|
|
@@ -9,7 +9,7 @@ export declare const updateEndpoint: (config: {
|
|
|
9
9
|
endpointResolver?: (((options: import("../../clients/types").EndpointResolverOptions, input?: any) => Endpoint) & (({ region }: import("../../clients/types").EndpointResolverOptions) => {
|
|
10
10
|
url: URL;
|
|
11
11
|
})) | undefined;
|
|
12
|
-
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown) => Promise<
|
|
12
|
+
retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("../../clients/types").MiddlewareContext | undefined) => Promise<import("../../clients").RetryDeciderOutput>) & ((response?: HttpResponse | undefined, error?: unknown) => Promise<import("../../clients").RetryDeciderOutput>)) | undefined;
|
|
13
13
|
computeDelay?: ((attempt: number) => number) | undefined;
|
|
14
14
|
userAgentValue?: string | undefined;
|
|
15
15
|
} & {
|
|
@@ -19,6 +19,6 @@ export declare const updateEndpoint: (config: {
|
|
|
19
19
|
maxAttempts?: number | undefined;
|
|
20
20
|
userAgentHeader?: string | undefined;
|
|
21
21
|
uriEscapePath?: boolean | undefined;
|
|
22
|
-
credentials: import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity | (() => Promise<import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity>);
|
|
22
|
+
credentials: import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity | ((options?: import("../../clients").CredentialsProviderOptions | undefined) => Promise<import("@smithy/types/dist-types/identity/awsCredentialIdentity").AwsCredentialIdentity>);
|
|
23
23
|
region: string;
|
|
24
24
|
}, input: import("./types").UpdateEndpointRequest) => Promise<UpdateEndpointOutput>;
|
|
@@ -5,8 +5,8 @@ export { authenticatedHandler } from './handlers/authenticated';
|
|
|
5
5
|
export { getHashedPayload, presignUrl, PresignUrlOptions, signRequest, SignRequestOptions, } from './middleware/signing/signer/signatureV4';
|
|
6
6
|
export { EMPTY_HASH as EMPTY_SHA256_HASH } from './middleware/signing/signer/signatureV4/constants';
|
|
7
7
|
export { extendedEncodeURIComponent } from './middleware/signing/utils/extendedEncodeURIComponent';
|
|
8
|
-
export { signingMiddlewareFactory, SigningOptions } from './middleware/signing';
|
|
9
|
-
export { getRetryDecider, jitteredBackoff, retryMiddlewareFactory, RetryOptions, } from './middleware/retry';
|
|
8
|
+
export { signingMiddlewareFactory, SigningOptions, CredentialsProviderOptions, } from './middleware/signing';
|
|
9
|
+
export { getRetryDecider, RetryDeciderOutput, jitteredBackoff, retryMiddlewareFactory, RetryOptions, } from './middleware/retry';
|
|
10
10
|
export { userAgentMiddlewareFactory, UserAgentOptions, } from './middleware/userAgent';
|
|
11
11
|
export { parseJsonBody, parseJsonError, parseMetadata } from './serde';
|
|
12
12
|
export { withMemoization } from './utils/memoization';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ErrorParser, HttpResponse } from '../../types';
|
|
2
|
+
import { RetryDeciderOutput } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* Get retry decider function
|
|
4
5
|
* @param errorParser Function to load JavaScript error from HTTP response
|
|
5
6
|
*/
|
|
6
|
-
export declare const getRetryDecider: (errorParser: ErrorParser) => (response?: HttpResponse, error?: unknown) => Promise<
|
|
7
|
+
export declare const getRetryDecider: (errorParser: ErrorParser) => (response?: HttpResponse, error?: unknown) => Promise<RetryDeciderOutput>;
|
|
@@ -12,10 +12,13 @@ const getRetryDecider = (errorParser) => async (response, error) => {
|
|
|
12
12
|
undefined;
|
|
13
13
|
const errorCode = parsedError?.code || parsedError?.name;
|
|
14
14
|
const statusCode = response?.statusCode;
|
|
15
|
-
|
|
15
|
+
const isRetryable = isConnectionError(error) ||
|
|
16
16
|
isThrottlingError(statusCode, errorCode) ||
|
|
17
17
|
isClockSkewError(errorCode) ||
|
|
18
|
-
isServerSideError(statusCode, errorCode)
|
|
18
|
+
isServerSideError(statusCode, errorCode);
|
|
19
|
+
return {
|
|
20
|
+
retryable: isRetryable,
|
|
21
|
+
};
|
|
19
22
|
};
|
|
20
23
|
// reference: https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L22-L37
|
|
21
24
|
const THROTTLING_ERROR_CODES = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultRetryDecider.mjs","sources":["../../../../../src/clients/middleware/retry/defaultRetryDecider.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { isClockSkewError } from './isClockSkewError';\n/**\n * Get retry decider function\n * @param errorParser Function to load JavaScript error from HTTP response\n */\nexport const 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.mjs","sources":["../../../../../src/clients/middleware/retry/defaultRetryDecider.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { isClockSkewError } from './isClockSkewError';\n/**\n * Get retry decider function\n * @param errorParser Function to load JavaScript error from HTTP response\n */\nexport const 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 const isRetryable = isConnectionError(error) ||\n isThrottlingError(statusCode, errorCode) ||\n isClockSkewError(errorCode) ||\n isServerSideError(statusCode, errorCode);\n return {\n retryable: isRetryable,\n };\n};\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":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,CAAC,WAAW,KAAK,OAAO,QAAQ,EAAE,KAAK,KAAK;AAC3E,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,MAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,CAAC;AAChD,QAAQ,iBAAiB,CAAC,UAAU,EAAE,SAAS,CAAC;AAChD,QAAQ,gBAAgB,CAAC,SAAS,CAAC;AACnC,QAAQ,iBAAiB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AACjD,IAAI,OAAO;AACX,QAAQ,SAAS,EAAE,WAAW;AAC9B,KAAK,CAAC;AACN,EAAE;AACF;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;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MiddlewareContext, MiddlewareHandler, Request, Response } from '../../types/core';
|
|
2
|
+
import { RetryDeciderOutput } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* Configuration of the retry middleware
|
|
4
5
|
*/
|
|
@@ -8,9 +9,10 @@ export interface RetryOptions<TResponse = Response> {
|
|
|
8
9
|
*
|
|
9
10
|
* @param response Optional response of the request.
|
|
10
11
|
* @param error Optional error thrown from previous attempts.
|
|
12
|
+
* @param middlewareContext Optional context object to store data between retries.
|
|
11
13
|
* @returns True if the request should be retried.
|
|
12
14
|
*/
|
|
13
|
-
retryDecider(response?: TResponse, error?: unknown): Promise<
|
|
15
|
+
retryDecider(response?: TResponse, error?: unknown, middlewareContext?: MiddlewareContext): Promise<RetryDeciderOutput>;
|
|
14
16
|
/**
|
|
15
17
|
* Function to compute the delay in milliseconds before the next retry based
|
|
16
18
|
* on the number of attempts.
|
|
@@ -38,7 +38,10 @@ const retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDec
|
|
|
38
38
|
? (context.attemptsCount ?? 0)
|
|
39
39
|
: attemptsCount + 1;
|
|
40
40
|
context.attemptsCount = attemptsCount;
|
|
41
|
-
|
|
41
|
+
const { isCredentialsExpiredError, retryable } = await retryDecider(response, error, context);
|
|
42
|
+
if (retryable) {
|
|
43
|
+
// Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.
|
|
44
|
+
context.isCredentialsExpired = !!isCredentialsExpiredError;
|
|
42
45
|
if (!abortSignal?.aborted && attemptsCount < maxAttempts) {
|
|
43
46
|
// prevent sleep for last attempt or cancelled request;
|
|
44
47
|
const delay = computeDelay(attemptsCount);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.mjs","sources":["../../../../../src/clients/middleware/retry/middleware.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_RETRY_ATTEMPTS = 3;\n/**\n * Retry middleware\n */\nexport const 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.mjs","sources":["../../../../../src/clients/middleware/retry/middleware.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_RETRY_ATTEMPTS = 3;\n/**\n * Retry middleware\n */\nexport const 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 const { isCredentialsExpiredError, retryable } = await retryDecider(response, error, context);\n if (retryable) {\n // Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.\n context.isCredentialsExpired = !!isCredentialsExpiredError;\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};\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.$metadata = {\n ...(nextHandlerOutput.$metadata ?? {}),\n attempts,\n };\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC;AACA;AACA;AACY,MAAC,sBAAsB,GAAG,CAAC,EAAE,WAAW,GAAG,sBAAsB,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,GAAG,KAAK;AAC9H,IAAI,IAAI,WAAW,GAAG,CAAC,EAAE;AACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;AAC9D,KAAK;AACL,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,KAAK,eAAe,eAAe,CAAC,OAAO,EAAE;AACtE,QAAQ,IAAI,KAAK,CAAC;AAClB,QAAQ,IAAI,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,CAAC,CAAC;AACvD,QAAQ,IAAI,QAAQ,CAAC;AACrB;AACA,QAAQ,MAAM,6BAA6B,GAAG,MAAM;AACpD,YAAY,IAAI,QAAQ,EAAE;AAC1B,gBAAgB,8BAA8B,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AACxE,gBAAgB,OAAO,QAAQ,CAAC;AAChC,aAAa;AACb,iBAAiB;AACjB,gBAAgB,8BAA8B,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AACrE,gBAAgB,MAAM,KAAK,CAAC;AAC5B,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,OAAO,CAAC,WAAW,EAAE,OAAO,IAAI,aAAa,GAAG,WAAW,EAAE;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MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,WAAW,KAAK;AACrD,IAAI,IAAI,WAAW,EAAE,OAAO,EAAE;AAC9B,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,IAAI,SAAS,CAAC;AAClB,IAAI,IAAI,qBAAqB,CAAC;AAC9B,IAAI,MAAM,YAAY,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;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { signingMiddlewareFactory, SigningOptions } from './middleware';
|
|
1
|
+
export { signingMiddlewareFactory, SigningOptions, CredentialsProviderOptions, } from './middleware';
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { Credentials, HttpRequest, HttpResponse, MiddlewareHandler } from '../../types';
|
|
2
|
+
import { MiddlewareContext } from '../../types/core';
|
|
3
|
+
/**
|
|
4
|
+
* Options type for the async callback function returning aws credentials. This
|
|
5
|
+
* function is used by SigV4 signer to resolve the aws credentials
|
|
6
|
+
*/
|
|
7
|
+
export interface CredentialsProviderOptions {
|
|
8
|
+
forceRefresh?: boolean;
|
|
9
|
+
}
|
|
2
10
|
/**
|
|
3
11
|
* Configuration of the signing middleware
|
|
4
12
|
*/
|
|
5
13
|
export interface SigningOptions {
|
|
6
|
-
credentials: Credentials | (() => Promise<Credentials>);
|
|
14
|
+
credentials: Credentials | ((options?: CredentialsProviderOptions) => Promise<Credentials>);
|
|
7
15
|
region: string;
|
|
8
16
|
service: string;
|
|
9
17
|
/**
|
|
@@ -18,4 +26,4 @@ export interface SigningOptions {
|
|
|
18
26
|
* Middleware that SigV4 signs request with AWS credentials, and correct system clock offset.
|
|
19
27
|
* This middleware is expected to be placed after retry middleware.
|
|
20
28
|
*/
|
|
21
|
-
export declare const signingMiddlewareFactory: ({ credentials, region, service, uriEscapePath, }: SigningOptions) => (next: MiddlewareHandler<HttpRequest, HttpResponse
|
|
29
|
+
export declare const signingMiddlewareFactory: ({ credentials, region, service, uriEscapePath, }: SigningOptions) => (next: MiddlewareHandler<HttpRequest, HttpResponse>, context: MiddlewareContext) => (request: HttpRequest) => Promise<HttpResponse>;
|
|
@@ -12,10 +12,14 @@ import { getUpdatedSystemClockOffset } from './utils/getUpdatedSystemClockOffset
|
|
|
12
12
|
*/
|
|
13
13
|
const signingMiddlewareFactory = ({ credentials, region, service, uriEscapePath = true, }) => {
|
|
14
14
|
let currentSystemClockOffset;
|
|
15
|
-
return (next) => async function signingMiddleware(request) {
|
|
15
|
+
return (next, context) => async function signingMiddleware(request) {
|
|
16
16
|
currentSystemClockOffset = currentSystemClockOffset ?? 0;
|
|
17
17
|
const signRequestOptions = {
|
|
18
|
-
credentials: typeof credentials === 'function'
|
|
18
|
+
credentials: typeof credentials === 'function'
|
|
19
|
+
? await credentials({
|
|
20
|
+
forceRefresh: !!context?.isCredentialsExpired,
|
|
21
|
+
})
|
|
22
|
+
: credentials,
|
|
19
23
|
signingDate: getSkewCorrectedDate(currentSystemClockOffset),
|
|
20
24
|
signingRegion: region,
|
|
21
25
|
signingService: service,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.mjs","sources":["../../../../../src/clients/middleware/signing/middleware.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { signRequest } from './signer/signatureV4';\nimport { getSkewCorrectedDate } from './utils/getSkewCorrectedDate';\nimport { getUpdatedSystemClockOffset } from './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 */\nexport const 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'
|
|
1
|
+
{"version":3,"file":"middleware.mjs","sources":["../../../../../src/clients/middleware/signing/middleware.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { signRequest } from './signer/signatureV4';\nimport { getSkewCorrectedDate } from './utils/getSkewCorrectedDate';\nimport { getUpdatedSystemClockOffset } from './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 */\nexport const signingMiddlewareFactory = ({ credentials, region, service, uriEscapePath = true, }) => {\n let currentSystemClockOffset;\n return (next, context) => async function signingMiddleware(request) {\n currentSystemClockOffset = currentSystemClockOffset ?? 0;\n const signRequestOptions = {\n credentials: typeof credentials === 'function'\n ? await credentials({\n forceRefresh: !!context?.isCredentialsExpired,\n })\n : credentials,\n signingDate: getSkewCorrectedDate(currentSystemClockOffset),\n signingRegion: region,\n signingService: service,\n uriEscapePath,\n };\n const signedRequest = await 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 = getUpdatedSystemClockOffset(Date.parse(dateString), currentSystemClockOffset);\n }\n return response;\n };\n};\nconst getDateHeader = ({ headers } = {}) => headers?.date ?? headers?.Date ?? headers?.['x-amz-date'];\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AAIA;AACA;AACA;AACA;AACY,MAAC,wBAAwB,GAAG,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,GAAG,KAAK;AACrG,IAAI,IAAI,wBAAwB,CAAC;AACjC,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,KAAK,eAAe,iBAAiB,CAAC,OAAO,EAAE;AACxE,QAAQ,wBAAwB,GAAG,wBAAwB,IAAI,CAAC,CAAC;AACjE,QAAQ,MAAM,kBAAkB,GAAG;AACnC,YAAY,WAAW,EAAE,OAAO,WAAW,KAAK,UAAU;AAC1D,kBAAkB,MAAM,WAAW,CAAC;AACpC,oBAAoB,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,oBAAoB;AACjE,iBAAiB,CAAC;AAClB,kBAAkB,WAAW;AAC7B,YAAY,WAAW,EAAE,oBAAoB,CAAC,wBAAwB,CAAC;AACvE,YAAY,aAAa,EAAE,MAAM;AACjC,YAAY,cAAc,EAAE,OAAO;AACnC,YAAY,aAAa;AACzB,SAAS,CAAC;AACV,QAAQ,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;AAC7E,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,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,wBAAwB,CAAC,CAAC;AACrH,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK,CAAC;AACN,EAAE;AACF,MAAM,aAAa,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,IAAI,IAAI,OAAO,GAAG,YAAY,CAAC;;;;"}
|
|
@@ -17,6 +17,11 @@ export type MiddlewareHandler<Input, Output> = (request: Input) => Promise<Outpu
|
|
|
17
17
|
* The context object to store states across the middleware chain.
|
|
18
18
|
*/
|
|
19
19
|
export interface MiddlewareContext {
|
|
20
|
+
/**
|
|
21
|
+
* Whether an error indicating expired credentials has been returned from server-side.
|
|
22
|
+
* This is set by the retry middleware.
|
|
23
|
+
*/
|
|
24
|
+
isCredentialsExpired?: boolean;
|
|
20
25
|
/**
|
|
21
26
|
* The number of times the request has been attempted. This is set by retry middleware
|
|
22
27
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Middleware, MiddlewareHandler, Request, Response, TransferHandler, Endpoint, } from './core';
|
|
1
|
+
export { Middleware, MiddlewareHandler, MiddlewareContext, Request, Response, TransferHandler, Endpoint, } from './core';
|
|
2
2
|
export { Headers, HttpRequest, HttpResponse, HttpTransferHandler, HttpTransferOptions, ResponseBodyMixin, } from './http';
|
|
3
3
|
export { Credentials, EndpointResolverOptions, ErrorParser, ServiceClientOptions, } from './aws';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.6-storage-browser-integrity.9563334.0+9563334",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"uuid": "^9.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@aws-amplify/react-native": "1.1.
|
|
63
|
+
"@aws-amplify/react-native": "1.1.7-storage-browser-integrity.9563334.0+9563334",
|
|
64
64
|
"@types/js-cookie": "3.0.2",
|
|
65
65
|
"genversion": "^2.2.0",
|
|
66
66
|
"typescript": "5.0.2"
|
|
@@ -192,5 +192,5 @@
|
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
"gitHead": "
|
|
195
|
+
"gitHead": "9563334a2f715317b4b18939c23258273804d959"
|
|
196
196
|
}
|
package/src/Platform/types.ts
CHANGED
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.6.
|
|
2
|
+
export const version = '6.6.6-storage-browser-integrity.9563334.0+9563334';
|
package/src/clients/index.ts
CHANGED
|
@@ -15,9 +15,14 @@ export {
|
|
|
15
15
|
} from './middleware/signing/signer/signatureV4';
|
|
16
16
|
export { EMPTY_HASH as EMPTY_SHA256_HASH } from './middleware/signing/signer/signatureV4/constants';
|
|
17
17
|
export { extendedEncodeURIComponent } from './middleware/signing/utils/extendedEncodeURIComponent';
|
|
18
|
-
export {
|
|
18
|
+
export {
|
|
19
|
+
signingMiddlewareFactory,
|
|
20
|
+
SigningOptions,
|
|
21
|
+
CredentialsProviderOptions,
|
|
22
|
+
} from './middleware/signing';
|
|
19
23
|
export {
|
|
20
24
|
getRetryDecider,
|
|
25
|
+
RetryDeciderOutput,
|
|
21
26
|
jitteredBackoff,
|
|
22
27
|
retryMiddlewareFactory,
|
|
23
28
|
RetryOptions,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { ErrorParser, HttpResponse } from '../../types';
|
|
5
5
|
|
|
6
6
|
import { isClockSkewError } from './isClockSkewError';
|
|
7
|
+
import { RetryDeciderOutput } from './types';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Get retry decider function
|
|
@@ -11,7 +12,10 @@ import { isClockSkewError } from './isClockSkewError';
|
|
|
11
12
|
*/
|
|
12
13
|
export const getRetryDecider =
|
|
13
14
|
(errorParser: ErrorParser) =>
|
|
14
|
-
async (
|
|
15
|
+
async (
|
|
16
|
+
response?: HttpResponse,
|
|
17
|
+
error?: unknown,
|
|
18
|
+
): Promise<RetryDeciderOutput> => {
|
|
15
19
|
const parsedError =
|
|
16
20
|
(error as Error & { code: string }) ??
|
|
17
21
|
(await errorParser(response)) ??
|
|
@@ -19,12 +23,15 @@ export const getRetryDecider =
|
|
|
19
23
|
const errorCode = parsedError?.code || parsedError?.name;
|
|
20
24
|
const statusCode = response?.statusCode;
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
const isRetryable =
|
|
23
27
|
isConnectionError(error) ||
|
|
24
28
|
isThrottlingError(statusCode, errorCode) ||
|
|
25
29
|
isClockSkewError(errorCode) ||
|
|
26
|
-
isServerSideError(statusCode, errorCode)
|
|
27
|
-
|
|
30
|
+
isServerSideError(statusCode, errorCode);
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
retryable: isRetryable,
|
|
34
|
+
};
|
|
28
35
|
};
|
|
29
36
|
|
|
30
37
|
// reference: https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L22-L37
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
Response,
|
|
9
9
|
} from '../../types/core';
|
|
10
10
|
|
|
11
|
+
import { RetryDeciderOutput } from './types';
|
|
12
|
+
|
|
11
13
|
const DEFAULT_RETRY_ATTEMPTS = 3;
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -19,9 +21,14 @@ export interface RetryOptions<TResponse = Response> {
|
|
|
19
21
|
*
|
|
20
22
|
* @param response Optional response of the request.
|
|
21
23
|
* @param error Optional error thrown from previous attempts.
|
|
24
|
+
* @param middlewareContext Optional context object to store data between retries.
|
|
22
25
|
* @returns True if the request should be retried.
|
|
23
26
|
*/
|
|
24
|
-
retryDecider(
|
|
27
|
+
retryDecider(
|
|
28
|
+
response?: TResponse,
|
|
29
|
+
error?: unknown,
|
|
30
|
+
middlewareContext?: MiddlewareContext,
|
|
31
|
+
): Promise<RetryDeciderOutput>;
|
|
25
32
|
/**
|
|
26
33
|
* Function to compute the delay in milliseconds before the next retry based
|
|
27
34
|
* on the number of attempts.
|
|
@@ -87,7 +94,14 @@ export const retryMiddlewareFactory = <TInput = Request, TOutput = Response>({
|
|
|
87
94
|
? (context.attemptsCount ?? 0)
|
|
88
95
|
: attemptsCount + 1;
|
|
89
96
|
context.attemptsCount = attemptsCount;
|
|
90
|
-
|
|
97
|
+
const { isCredentialsExpiredError, retryable } = await retryDecider(
|
|
98
|
+
response,
|
|
99
|
+
error,
|
|
100
|
+
context,
|
|
101
|
+
);
|
|
102
|
+
if (retryable) {
|
|
103
|
+
// Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.
|
|
104
|
+
context.isCredentialsExpired = !!isCredentialsExpiredError;
|
|
91
105
|
if (!abortSignal?.aborted && attemptsCount < maxAttempts) {
|
|
92
106
|
// prevent sleep for last attempt or cancelled request;
|
|
93
107
|
const delay = computeDelay(attemptsCount);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
export {
|
|
4
|
+
export {
|
|
5
|
+
signingMiddlewareFactory,
|
|
6
|
+
SigningOptions,
|
|
7
|
+
CredentialsProviderOptions,
|
|
8
|
+
} from './middleware';
|
|
@@ -7,16 +7,27 @@ import {
|
|
|
7
7
|
HttpResponse,
|
|
8
8
|
MiddlewareHandler,
|
|
9
9
|
} from '../../types';
|
|
10
|
+
import { MiddlewareContext } from '../../types/core';
|
|
10
11
|
|
|
11
12
|
import { signRequest } from './signer/signatureV4';
|
|
12
13
|
import { getSkewCorrectedDate } from './utils/getSkewCorrectedDate';
|
|
13
14
|
import { getUpdatedSystemClockOffset } from './utils/getUpdatedSystemClockOffset';
|
|
14
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Options type for the async callback function returning aws credentials. This
|
|
18
|
+
* function is used by SigV4 signer to resolve the aws credentials
|
|
19
|
+
*/
|
|
20
|
+
export interface CredentialsProviderOptions {
|
|
21
|
+
forceRefresh?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
15
24
|
/**
|
|
16
25
|
* Configuration of the signing middleware
|
|
17
26
|
*/
|
|
18
27
|
export interface SigningOptions {
|
|
19
|
-
credentials:
|
|
28
|
+
credentials:
|
|
29
|
+
| Credentials
|
|
30
|
+
| ((options?: CredentialsProviderOptions) => Promise<Credentials>);
|
|
20
31
|
region: string;
|
|
21
32
|
service: string;
|
|
22
33
|
|
|
@@ -41,12 +52,19 @@ export const signingMiddlewareFactory = ({
|
|
|
41
52
|
}: SigningOptions) => {
|
|
42
53
|
let currentSystemClockOffset: number;
|
|
43
54
|
|
|
44
|
-
return (
|
|
55
|
+
return (
|
|
56
|
+
next: MiddlewareHandler<HttpRequest, HttpResponse>,
|
|
57
|
+
context: MiddlewareContext,
|
|
58
|
+
) =>
|
|
45
59
|
async function signingMiddleware(request: HttpRequest) {
|
|
46
60
|
currentSystemClockOffset = currentSystemClockOffset ?? 0;
|
|
47
61
|
const signRequestOptions = {
|
|
48
62
|
credentials:
|
|
49
|
-
typeof credentials === 'function'
|
|
63
|
+
typeof credentials === 'function'
|
|
64
|
+
? await credentials({
|
|
65
|
+
forceRefresh: !!context?.isCredentialsExpired,
|
|
66
|
+
})
|
|
67
|
+
: credentials,
|
|
50
68
|
signingDate: getSkewCorrectedDate(currentSystemClockOffset),
|
|
51
69
|
signingRegion: region,
|
|
52
70
|
signingService: service,
|
|
@@ -30,6 +30,11 @@ export type MiddlewareHandler<Input, Output> = (
|
|
|
30
30
|
* The context object to store states across the middleware chain.
|
|
31
31
|
*/
|
|
32
32
|
export interface MiddlewareContext {
|
|
33
|
+
/**
|
|
34
|
+
* Whether an error indicating expired credentials has been returned from server-side.
|
|
35
|
+
* This is set by the retry middleware.
|
|
36
|
+
*/
|
|
37
|
+
isCredentialsExpired?: boolean;
|
|
33
38
|
/**
|
|
34
39
|
* The number of times the request has been attempted. This is set by retry middleware
|
|
35
40
|
*/
|