@aws-amplify/core 6.10.6 → 6.10.7-unstable.b188564.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/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/awsClients/pinpoint/getInAppMessages.js +1 -1
- package/dist/cjs/awsClients/pinpoint/getInAppMessages.js.map +1 -1
- package/dist/cjs/awsClients/pinpoint/putEvents.js +1 -1
- package/dist/cjs/awsClients/pinpoint/putEvents.js.map +1 -1
- package/dist/cjs/awsClients/pinpoint/updateEndpoint.js +1 -1
- package/dist/cjs/awsClients/pinpoint/updateEndpoint.js.map +1 -1
- package/dist/cjs/clients/handlers/{authenticated.js → aws/authenticated.js} +9 -7
- package/dist/cjs/clients/handlers/aws/authenticated.js.map +1 -0
- package/dist/cjs/clients/handlers/aws/unauthenticated.js +17 -0
- package/dist/cjs/clients/handlers/aws/unauthenticated.js.map +1 -0
- package/dist/cjs/clients/index.js +5 -3
- package/dist/cjs/clients/index.js.map +1 -1
- package/dist/cjs/clients/middleware/retry/amzSdkInvocationIdHeaderMiddleware.js +28 -0
- package/dist/cjs/clients/middleware/retry/amzSdkInvocationIdHeaderMiddleware.js.map +1 -0
- package/dist/cjs/clients/middleware/retry/amzSdkRequestHeaderMiddleware.js +27 -0
- package/dist/cjs/clients/middleware/retry/amzSdkRequestHeaderMiddleware.js.map +1 -0
- package/dist/cjs/clients/middleware/retry/constants.js +11 -0
- package/dist/cjs/clients/middleware/retry/constants.js.map +1 -0
- package/dist/cjs/clients/middleware/retry/index.js +7 -3
- package/dist/cjs/clients/middleware/retry/index.js.map +1 -1
- package/dist/cjs/clients/middleware/retry/jitteredBackoff.js +3 -3
- package/dist/cjs/clients/middleware/retry/jitteredBackoff.js.map +1 -1
- package/dist/cjs/clients/middleware/retry/{middleware.js → retryMiddleware.js} +4 -6
- package/dist/cjs/clients/middleware/retry/retryMiddleware.js.map +1 -0
- package/dist/cjs/clients/types/aws.js +0 -2
- package/dist/cjs/clients/types/aws.js.map +1 -1
- package/dist/cjs/errors/AmplifyError.js +6 -3
- package/dist/cjs/errors/AmplifyError.js.map +1 -1
- package/dist/cjs/types/errors.js +0 -2
- package/dist/cjs/types/errors.js.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/ServiceWorker/ServiceWorker.mjs +9 -1
- package/dist/esm/ServiceWorker/ServiceWorker.mjs.map +1 -1
- package/dist/esm/awsClients/cognitoIdentity/base.d.ts +1 -1
- package/dist/esm/awsClients/cognitoIdentity/base.mjs +13 -3
- package/dist/esm/awsClients/cognitoIdentity/base.mjs.map +1 -1
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs +9 -0
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs.map +1 -1
- package/dist/esm/awsClients/cognitoIdentity/getId.mjs +9 -0
- package/dist/esm/awsClients/cognitoIdentity/getId.mjs.map +1 -1
- package/dist/esm/awsClients/pinpoint/base.mjs +16 -2
- package/dist/esm/awsClients/pinpoint/base.mjs.map +1 -1
- package/dist/esm/awsClients/pinpoint/getInAppMessages.d.ts +3 -3
- package/dist/esm/awsClients/pinpoint/getInAppMessages.mjs +1 -1
- package/dist/esm/awsClients/pinpoint/getInAppMessages.mjs.map +1 -1
- package/dist/esm/awsClients/pinpoint/putEvents.d.ts +3 -3
- package/dist/esm/awsClients/pinpoint/putEvents.mjs +1 -1
- package/dist/esm/awsClients/pinpoint/putEvents.mjs.map +1 -1
- package/dist/esm/awsClients/pinpoint/updateEndpoint.d.ts +3 -3
- package/dist/esm/awsClients/pinpoint/updateEndpoint.mjs +1 -1
- package/dist/esm/awsClients/pinpoint/updateEndpoint.mjs.map +1 -1
- package/dist/esm/clients/handlers/aws/authenticated.d.ts +5 -0
- package/dist/esm/clients/handlers/aws/authenticated.mjs +24 -0
- package/dist/esm/clients/handlers/aws/authenticated.mjs.map +1 -0
- package/dist/esm/clients/handlers/aws/unauthenticated.d.ts +4 -0
- package/dist/esm/clients/handlers/aws/unauthenticated.mjs +22 -0
- package/dist/esm/clients/handlers/aws/unauthenticated.mjs.map +1 -0
- package/dist/esm/clients/index.d.ts +4 -4
- package/dist/esm/clients/index.mjs +5 -3
- package/dist/esm/clients/index.mjs.map +1 -1
- package/dist/esm/clients/middleware/retry/amzSdkInvocationIdHeaderMiddleware.d.ts +12 -0
- package/dist/esm/clients/middleware/retry/amzSdkInvocationIdHeaderMiddleware.mjs +40 -0
- package/dist/esm/clients/middleware/retry/amzSdkInvocationIdHeaderMiddleware.mjs.map +1 -0
- package/dist/esm/clients/middleware/retry/amzSdkRequestHeaderMiddleware.d.ts +14 -0
- package/dist/esm/clients/middleware/retry/amzSdkRequestHeaderMiddleware.mjs +25 -0
- package/dist/esm/clients/middleware/retry/amzSdkRequestHeaderMiddleware.mjs.map +1 -0
- package/dist/esm/clients/middleware/retry/constants.d.ts +4 -0
- package/dist/esm/clients/middleware/retry/constants.mjs +9 -0
- package/dist/esm/clients/middleware/retry/constants.mjs.map +1 -0
- package/dist/esm/clients/middleware/retry/index.d.ts +3 -1
- package/dist/esm/clients/middleware/retry/index.mjs +3 -1
- package/dist/esm/clients/middleware/retry/index.mjs.map +1 -1
- package/dist/esm/clients/middleware/retry/jitteredBackoff.d.ts +1 -1
- package/dist/esm/clients/middleware/retry/jitteredBackoff.mjs +1 -1
- package/dist/esm/clients/middleware/retry/jitteredBackoff.mjs.map +1 -1
- package/dist/esm/clients/middleware/retry/{middleware.d.ts → retryMiddleware.d.ts} +4 -4
- package/dist/esm/clients/middleware/retry/{middleware.mjs → retryMiddleware.mjs} +4 -5
- package/dist/esm/clients/middleware/retry/retryMiddleware.mjs.map +1 -0
- package/dist/esm/clients/types/aws.d.ts +1 -1
- package/dist/esm/errors/AmplifyError.d.ts +8 -4
- package/dist/esm/errors/AmplifyError.mjs +6 -3
- package/dist/esm/errors/AmplifyError.mjs.map +1 -1
- package/dist/esm/providers/pinpoint/apis/updateEndpoint.mjs +9 -1
- package/dist/esm/providers/pinpoint/apis/updateEndpoint.mjs.map +1 -1
- package/dist/esm/providers/pinpoint/utils/PinpointEventBuffer.mjs +9 -0
- package/dist/esm/providers/pinpoint/utils/PinpointEventBuffer.mjs.map +1 -1
- package/dist/esm/singleton/Auth/types.d.ts +1 -1
- package/dist/esm/types/errors.d.ts +3 -0
- package/dist/esm/types/errors.mjs +0 -2
- package/dist/esm/types/errors.mjs.map +1 -1
- package/package.json +8 -8
- package/src/Platform/version.ts +1 -1
- package/src/awsClients/pinpoint/getInAppMessages.ts +1 -1
- package/src/awsClients/pinpoint/putEvents.ts +1 -1
- package/src/awsClients/pinpoint/updateEndpoint.ts +1 -1
- package/src/clients/handlers/aws/authenticated.ts +39 -0
- package/src/clients/handlers/aws/unauthenticated.ts +34 -0
- package/src/clients/index.ts +7 -4
- package/src/clients/middleware/retry/amzSdkInvocationIdHeaderMiddleware.ts +31 -0
- package/src/clients/middleware/retry/amzSdkRequestHeaderMiddleware.ts +38 -0
- package/src/clients/middleware/retry/constants.ts +10 -0
- package/src/clients/middleware/retry/index.ts +6 -1
- package/src/clients/middleware/retry/jitteredBackoff.ts +2 -3
- package/src/clients/middleware/retry/{middleware.ts → retryMiddleware.ts} +10 -9
- package/src/clients/types/aws.ts +1 -5
- package/src/errors/AmplifyError.ts +13 -4
- package/src/singleton/Auth/types.ts +1 -5
- package/src/types/errors.ts +7 -0
- package/dist/cjs/clients/handlers/authenticated.js.map +0 -1
- package/dist/cjs/clients/handlers/unauthenticated.js +0 -12
- package/dist/cjs/clients/handlers/unauthenticated.js.map +0 -1
- package/dist/cjs/clients/middleware/retry/middleware.js.map +0 -1
- package/dist/esm/clients/handlers/authenticated.d.ts +0 -5
- package/dist/esm/clients/handlers/authenticated.mjs +0 -20
- package/dist/esm/clients/handlers/authenticated.mjs.map +0 -1
- package/dist/esm/clients/handlers/unauthenticated.d.ts +0 -4
- package/dist/esm/clients/handlers/unauthenticated.mjs +0 -15
- package/dist/esm/clients/handlers/unauthenticated.mjs.map +0 -1
- package/dist/esm/clients/middleware/retry/middleware.mjs.map +0 -1
- package/src/clients/handlers/authenticated.ts +0 -27
- package/src/clients/handlers/unauthenticated.ts +0 -19
|
@@ -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.13.
|
|
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.13.7-unstable.b188564.0+b188564';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,OAAO,GAAG,MAAM;AACxB;AACA,OAAO,CAAC,OAAO,GAAG,mCAAmC;;"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getInAppMessages = void 0;
|
|
7
|
-
const authenticated_1 = require("../../clients/handlers/authenticated");
|
|
7
|
+
const authenticated_1 = require("../../clients/handlers/aws/authenticated");
|
|
8
8
|
const composeServiceApi_1 = require("../../clients/internal/composeServiceApi");
|
|
9
9
|
const extendedEncodeURIComponent_1 = require("../../clients/middleware/signing/utils/extendedEncodeURIComponent");
|
|
10
10
|
const serde_1 = require("../../clients/serde");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInAppMessages.js","sources":["../../../../src/awsClients/pinpoint/getInAppMessages.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.getInAppMessages = void 0;\nconst authenticated_1 = require(\"../../clients/handlers/authenticated\");\nconst composeServiceApi_1 = require(\"../../clients/internal/composeServiceApi\");\nconst extendedEncodeURIComponent_1 = require(\"../../clients/middleware/signing/utils/extendedEncodeURIComponent\");\nconst serde_1 = require(\"../../clients/serde\");\nconst amplifyUrl_1 = require(\"../../utils/amplifyUrl\");\nconst base_1 = require(\"./base\");\nconst getInAppMessagesSerializer = ({ ApplicationId = '', EndpointId = '' }, endpoint) => {\n const headers = (0, base_1.getSharedHeaders)();\n const url = new amplifyUrl_1.AmplifyUrl(endpoint.url);\n url.pathname = `v1/apps/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(ApplicationId)}/endpoints/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(EndpointId)}/inappmessages`;\n return { method: 'GET', headers, url };\n};\nconst getInAppMessagesDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, serde_1.parseJsonError)(response);\n throw error;\n }\n else {\n const { InAppMessageCampaigns } = await (0, serde_1.parseJsonBody)(response);\n return {\n InAppMessagesResponse: { InAppMessageCampaigns },\n $metadata: (0, serde_1.parseMetadata)(response),\n };\n }\n};\n/**\n * @internal\n */\nexports.getInAppMessages = (0, composeServiceApi_1.composeServiceApi)(authenticated_1.authenticatedHandler, getInAppMessagesSerializer, getInAppMessagesDeserializer, base_1.defaultConfig);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gBAAgB,GAAG,MAAM;AACjC,MAAM,eAAe,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"getInAppMessages.js","sources":["../../../../src/awsClients/pinpoint/getInAppMessages.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.getInAppMessages = void 0;\nconst authenticated_1 = require(\"../../clients/handlers/aws/authenticated\");\nconst composeServiceApi_1 = require(\"../../clients/internal/composeServiceApi\");\nconst extendedEncodeURIComponent_1 = require(\"../../clients/middleware/signing/utils/extendedEncodeURIComponent\");\nconst serde_1 = require(\"../../clients/serde\");\nconst amplifyUrl_1 = require(\"../../utils/amplifyUrl\");\nconst base_1 = require(\"./base\");\nconst getInAppMessagesSerializer = ({ ApplicationId = '', EndpointId = '' }, endpoint) => {\n const headers = (0, base_1.getSharedHeaders)();\n const url = new amplifyUrl_1.AmplifyUrl(endpoint.url);\n url.pathname = `v1/apps/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(ApplicationId)}/endpoints/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(EndpointId)}/inappmessages`;\n return { method: 'GET', headers, url };\n};\nconst getInAppMessagesDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, serde_1.parseJsonError)(response);\n throw error;\n }\n else {\n const { InAppMessageCampaigns } = await (0, serde_1.parseJsonBody)(response);\n return {\n InAppMessagesResponse: { InAppMessageCampaigns },\n $metadata: (0, serde_1.parseMetadata)(response),\n };\n }\n};\n/**\n * @internal\n */\nexports.getInAppMessages = (0, composeServiceApi_1.composeServiceApi)(authenticated_1.authenticatedHandler, getInAppMessagesSerializer, getInAppMessagesDeserializer, base_1.defaultConfig);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gBAAgB,GAAG,MAAM;AACjC,MAAM,eAAe,GAAG,OAAO,CAAC,0CAA0C,CAAC;AAC3E,MAAM,mBAAmB,GAAG,OAAO,CAAC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;AACA;AACA;AACA,OAAO,CAAC,gBAAgB,GAAG,IAAI,mBAAmB,CAAC,iBAAiB,EAAE,eAAe,CAAC,oBAAoB,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,CAAC,aAAa,CAAC;;"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.putEvents = void 0;
|
|
7
|
-
const authenticated_1 = require("../../clients/handlers/authenticated");
|
|
7
|
+
const authenticated_1 = require("../../clients/handlers/aws/authenticated");
|
|
8
8
|
const composeServiceApi_1 = require("../../clients/internal/composeServiceApi");
|
|
9
9
|
const extendedEncodeURIComponent_1 = require("../../clients/middleware/signing/utils/extendedEncodeURIComponent");
|
|
10
10
|
const serde_1 = require("../../clients/serde");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"putEvents.js","sources":["../../../../src/awsClients/pinpoint/putEvents.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.putEvents = void 0;\nconst authenticated_1 = require(\"../../clients/handlers/authenticated\");\nconst composeServiceApi_1 = require(\"../../clients/internal/composeServiceApi\");\nconst extendedEncodeURIComponent_1 = require(\"../../clients/middleware/signing/utils/extendedEncodeURIComponent\");\nconst serde_1 = require(\"../../clients/serde\");\nconst amplifyUrl_1 = require(\"../../utils/amplifyUrl\");\nconst base_1 = require(\"./base\");\nconst errorHelpers_1 = require(\"./errorHelpers\");\nconst putEventsSerializer = ({ ApplicationId, EventsRequest }, endpoint) => {\n (0, errorHelpers_1.assert)(!!ApplicationId, errorHelpers_1.PinpointValidationErrorCode.NoAppId);\n const headers = (0, base_1.getSharedHeaders)();\n const url = new amplifyUrl_1.AmplifyUrl(endpoint.url);\n url.pathname = `v1/apps/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(ApplicationId)}/events`;\n const body = JSON.stringify(EventsRequest ?? {});\n return { method: 'POST', headers, url, body };\n};\nconst putEventsDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, serde_1.parseJsonError)(response);\n throw error;\n }\n else {\n const { Results } = await (0, serde_1.parseJsonBody)(response);\n return {\n EventsResponse: { Results },\n $metadata: (0, serde_1.parseMetadata)(response),\n };\n }\n};\n/**\n * @internal\n */\nexports.putEvents = (0, composeServiceApi_1.composeServiceApi)(authenticated_1.authenticatedHandler, putEventsSerializer, putEventsDeserializer, base_1.defaultConfig);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,SAAS,GAAG,MAAM;AAC1B,MAAM,eAAe,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"putEvents.js","sources":["../../../../src/awsClients/pinpoint/putEvents.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.putEvents = void 0;\nconst authenticated_1 = require(\"../../clients/handlers/aws/authenticated\");\nconst composeServiceApi_1 = require(\"../../clients/internal/composeServiceApi\");\nconst extendedEncodeURIComponent_1 = require(\"../../clients/middleware/signing/utils/extendedEncodeURIComponent\");\nconst serde_1 = require(\"../../clients/serde\");\nconst amplifyUrl_1 = require(\"../../utils/amplifyUrl\");\nconst base_1 = require(\"./base\");\nconst errorHelpers_1 = require(\"./errorHelpers\");\nconst putEventsSerializer = ({ ApplicationId, EventsRequest }, endpoint) => {\n (0, errorHelpers_1.assert)(!!ApplicationId, errorHelpers_1.PinpointValidationErrorCode.NoAppId);\n const headers = (0, base_1.getSharedHeaders)();\n const url = new amplifyUrl_1.AmplifyUrl(endpoint.url);\n url.pathname = `v1/apps/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(ApplicationId)}/events`;\n const body = JSON.stringify(EventsRequest ?? {});\n return { method: 'POST', headers, url, body };\n};\nconst putEventsDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, serde_1.parseJsonError)(response);\n throw error;\n }\n else {\n const { Results } = await (0, serde_1.parseJsonBody)(response);\n return {\n EventsResponse: { Results },\n $metadata: (0, serde_1.parseMetadata)(response),\n };\n }\n};\n/**\n * @internal\n */\nexports.putEvents = (0, composeServiceApi_1.composeServiceApi)(authenticated_1.authenticatedHandler, putEventsSerializer, putEventsDeserializer, base_1.defaultConfig);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,SAAS,GAAG,MAAM;AAC1B,MAAM,eAAe,GAAG,OAAO,CAAC,0CAA0C,CAAC;AAC3E,MAAM,mBAAmB,GAAG,OAAO,CAAC,0CAA0C,CAAC;AAC/E,MAAM,4BAA4B,GAAG,OAAO,CAAC,mEAAmE,CAAC;AACjH,MAAM,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC;AAC9C,MAAM,YAAY,GAAG,OAAO,CAAC,wBAAwB,CAAC;AACtD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;AAChC,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAChD,MAAM,mBAAmB,GAAG,CAAC,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE,QAAQ,KAAK;AAC5E,IAAI,IAAI,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,aAAa,EAAE,cAAc,CAAC,2BAA2B,CAAC,OAAO,CAAC;AACnG,IAAI,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,gBAAgB,GAAG;AAClD,IAAI,MAAM,GAAG,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzD,IAAI,GAAG,CAAC,QAAQ,GAAG,CAAC,QAAQ,EAAE,IAAI,4BAA4B,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAC,OAAO,CAAC;AAClH,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,IAAI,EAAE,CAAC;AACpD,IAAI,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE;AACjD,CAAC;AACD,MAAM,qBAAqB,GAAG,OAAO,QAAQ,KAAK;AAClD,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE;AACpC,QAAQ,MAAM,KAAK,GAAG,MAAM,IAAI,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC;AACjE,QAAQ,MAAM,KAAK;AACnB;AACA,SAAS;AACT,QAAQ,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC;AACtE,QAAQ,OAAO;AACf,YAAY,cAAc,EAAE,EAAE,OAAO,EAAE;AACvC,YAAY,SAAS,EAAE,IAAI,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC;AAC3D,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA,OAAO,CAAC,SAAS,GAAG,IAAI,mBAAmB,CAAC,iBAAiB,EAAE,eAAe,CAAC,oBAAoB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,CAAC,aAAa,CAAC;;"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.updateEndpoint = void 0;
|
|
7
|
-
const authenticated_1 = require("../../clients/handlers/authenticated");
|
|
7
|
+
const authenticated_1 = require("../../clients/handlers/aws/authenticated");
|
|
8
8
|
const composeServiceApi_1 = require("../../clients/internal/composeServiceApi");
|
|
9
9
|
const extendedEncodeURIComponent_1 = require("../../clients/middleware/signing/utils/extendedEncodeURIComponent");
|
|
10
10
|
const serde_1 = require("../../clients/serde");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateEndpoint.js","sources":["../../../../src/awsClients/pinpoint/updateEndpoint.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.updateEndpoint = void 0;\nconst authenticated_1 = require(\"../../clients/handlers/authenticated\");\nconst composeServiceApi_1 = require(\"../../clients/internal/composeServiceApi\");\nconst extendedEncodeURIComponent_1 = require(\"../../clients/middleware/signing/utils/extendedEncodeURIComponent\");\nconst serde_1 = require(\"../../clients/serde\");\nconst amplifyUrl_1 = require(\"../../utils/amplifyUrl\");\nconst base_1 = require(\"./base\");\nconst updateEndpointSerializer = ({ ApplicationId = '', EndpointId = '', EndpointRequest }, endpoint) => {\n const headers = (0, base_1.getSharedHeaders)();\n const url = new amplifyUrl_1.AmplifyUrl(endpoint.url);\n url.pathname = `v1/apps/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(ApplicationId)}/endpoints/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(EndpointId)}`;\n const body = JSON.stringify(EndpointRequest);\n return { method: 'PUT', headers, url, body };\n};\nconst updateEndpointDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, serde_1.parseJsonError)(response);\n throw error;\n }\n else {\n const { Message, RequestID } = await (0, serde_1.parseJsonBody)(response);\n return {\n MessageBody: {\n Message,\n RequestID,\n },\n $metadata: (0, serde_1.parseMetadata)(response),\n };\n }\n};\n/**\n * @internal\n */\nexports.updateEndpoint = (0, composeServiceApi_1.composeServiceApi)(authenticated_1.authenticatedHandler, updateEndpointSerializer, updateEndpointDeserializer, base_1.defaultConfig);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,cAAc,GAAG,MAAM;AAC/B,MAAM,eAAe,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"updateEndpoint.js","sources":["../../../../src/awsClients/pinpoint/updateEndpoint.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.updateEndpoint = void 0;\nconst authenticated_1 = require(\"../../clients/handlers/aws/authenticated\");\nconst composeServiceApi_1 = require(\"../../clients/internal/composeServiceApi\");\nconst extendedEncodeURIComponent_1 = require(\"../../clients/middleware/signing/utils/extendedEncodeURIComponent\");\nconst serde_1 = require(\"../../clients/serde\");\nconst amplifyUrl_1 = require(\"../../utils/amplifyUrl\");\nconst base_1 = require(\"./base\");\nconst updateEndpointSerializer = ({ ApplicationId = '', EndpointId = '', EndpointRequest }, endpoint) => {\n const headers = (0, base_1.getSharedHeaders)();\n const url = new amplifyUrl_1.AmplifyUrl(endpoint.url);\n url.pathname = `v1/apps/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(ApplicationId)}/endpoints/${(0, extendedEncodeURIComponent_1.extendedEncodeURIComponent)(EndpointId)}`;\n const body = JSON.stringify(EndpointRequest);\n return { method: 'PUT', headers, url, body };\n};\nconst updateEndpointDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await (0, serde_1.parseJsonError)(response);\n throw error;\n }\n else {\n const { Message, RequestID } = await (0, serde_1.parseJsonBody)(response);\n return {\n MessageBody: {\n Message,\n RequestID,\n },\n $metadata: (0, serde_1.parseMetadata)(response),\n };\n }\n};\n/**\n * @internal\n */\nexports.updateEndpoint = (0, composeServiceApi_1.composeServiceApi)(authenticated_1.authenticatedHandler, updateEndpointSerializer, updateE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AAM,IAAI,OAAO,CAAC,cAAc,EAAE,QAAQ,CAAC;AACjE,QAAQ,MAAM,KAAK;AACnB;AACA,SAAS;AACT,QAAQ,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC;AACjF,QAAQ,OAAO;AACf,YAAY,WAAW,EAAE;AACzB,gBAAgB,OAAO;AACvB,gBAAgB,SAAS;AACzB,aAAa;AACb,YAAY,SAAS,EAAE,IAAI,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC;AAC3D,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA,OAAO,CAAC,cAAc,GAAG,IAAI,mBAAmB,CAAC,iBAAiB,EAAE,eAAe,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,CAAC,aAAa,CAAC;;"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
4
|
exports.authenticatedHandler = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
5
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
const retry_1 = require("../../middleware/retry");
|
|
8
|
+
const signing_1 = require("../../middleware/signing");
|
|
9
|
+
const userAgent_1 = require("../../middleware/userAgent");
|
|
10
|
+
const composeTransferHandler_1 = require("../../internal/composeTransferHandler");
|
|
11
|
+
const fetch_1 = require("../fetch");
|
|
12
12
|
exports.authenticatedHandler = (0, composeTransferHandler_1.composeTransferHandler)(fetch_1.fetchTransferHandler, [
|
|
13
13
|
userAgent_1.userAgentMiddlewareFactory,
|
|
14
|
+
retry_1.amzSdkInvocationIdHeaderMiddlewareFactory,
|
|
14
15
|
retry_1.retryMiddlewareFactory,
|
|
16
|
+
retry_1.amzSdkRequestHeaderMiddlewareFactory,
|
|
15
17
|
signing_1.signingMiddlewareFactory,
|
|
16
18
|
]);
|
|
17
19
|
//# sourceMappingURL=authenticated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticated.js","sources":["../../../../../src/clients/handlers/aws/authenticated.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.authenticatedHandler = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst retry_1 = require(\"../../middleware/retry\");\nconst signing_1 = require(\"../../middleware/signing\");\nconst userAgent_1 = require(\"../../middleware/userAgent\");\nconst composeTransferHandler_1 = require(\"../../internal/composeTransferHandler\");\nconst fetch_1 = require(\"../fetch\");\nexports.authenticatedHandler = (0, composeTransferHandler_1.composeTransferHandler)(fetch_1.fetchTransferHandler, [\n userAgent_1.userAgentMiddlewareFactory,\n retry_1.amzSdkInvocationIdHeaderMiddlewareFactory,\n retry_1.retryMiddlewareFactory,\n retry_1.amzSdkRequestHeaderMiddlewareFactory,\n signing_1.signingMiddlewareFactory,\n]);\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,MAAM;AACrC;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC;AACjD,MAAM,SAAS,GAAG,OAAO,CAAC,0BAA0B,CAAC;AACrD,MAAM,WAAW,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACzD,MAAM,wBAAwB,GAAG,OAAO,CAAC,uCAAuC,CAAC;AACjF,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,OAAO,CAAC,oBAAoB,GAAG,IAAI,wBAAwB,CAAC,sBAAsB,EAAE,OAAO,CAAC,oBAAoB,EAAE;AAClH,IAAI,WAAW,CAAC,0BAA0B;AAC1C,IAAI,OAAO,CAAC,yCAAyC;AACrD,IAAI,OAAO,CAAC,sBAAsB;AAClC,IAAI,OAAO,CAAC,oCAAoC;AAChD,IAAI,SAAS,CAAC,wBAAwB;AACtC,CAAC,CAAC;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.unauthenticatedHandler = void 0;
|
|
7
|
+
const retry_1 = require("../../middleware/retry");
|
|
8
|
+
const userAgent_1 = require("../../middleware/userAgent");
|
|
9
|
+
const composeTransferHandler_1 = require("../../internal/composeTransferHandler");
|
|
10
|
+
const fetch_1 = require("../fetch");
|
|
11
|
+
exports.unauthenticatedHandler = (0, composeTransferHandler_1.composeTransferHandler)(fetch_1.fetchTransferHandler, [
|
|
12
|
+
userAgent_1.userAgentMiddlewareFactory,
|
|
13
|
+
retry_1.amzSdkInvocationIdHeaderMiddlewareFactory,
|
|
14
|
+
retry_1.retryMiddlewareFactory,
|
|
15
|
+
retry_1.amzSdkRequestHeaderMiddlewareFactory,
|
|
16
|
+
]);
|
|
17
|
+
//# sourceMappingURL=unauthenticated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unauthenticated.js","sources":["../../../../../src/clients/handlers/aws/unauthenticated.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.unauthenticatedHandler = void 0;\nconst retry_1 = require(\"../../middleware/retry\");\nconst userAgent_1 = require(\"../../middleware/userAgent\");\nconst composeTransferHandler_1 = require(\"../../internal/composeTransferHandler\");\nconst fetch_1 = require(\"../fetch\");\nexports.unauthenticatedHandler = (0, composeTransferHandler_1.composeTransferHandler)(fetch_1.fetchTransferHandler, [\n userAgent_1.userAgentMiddlewareFactory,\n retry_1.amzSdkInvocationIdHeaderMiddlewareFactory,\n retry_1.retryMiddlewareFactory,\n retry_1.amzSdkRequestHeaderMiddlewareFactory,\n]);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,sBAAsB,GAAG,MAAM;AACvC,MAAM,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC;AACjD,MAAM,WAAW,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACzD,MAAM,wBAAwB,GAAG,OAAO,CAAC,uCAAuC,CAAC;AACjF,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,OAAO,CAAC,sBAAsB,GAAG,IAAI,wBAAwB,CAAC,sBAAsB,EAAE,OAAO,CAAC,oBAAoB,EAAE;AACpH,IAAI,WAAW,CAAC,0BAA0B;AAC1C,IAAI,OAAO,CAAC,yCAAyC;AACrD,IAAI,OAAO,CAAC,sBAAsB;AAClC,IAAI,OAAO,CAAC,oCAAoC;AAChD,CAAC,CAAC;;"}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.withMemoization = exports.parseMetadata = exports.parseJsonError = exports.parseJsonBody = exports.userAgentMiddlewareFactory = exports.retryMiddlewareFactory = exports.jitteredBackoff = exports.getRetryDecider = exports.signingMiddlewareFactory = exports.extendedEncodeURIComponent = exports.EMPTY_SHA256_HASH = exports.signRequest = exports.presignUrl = exports.getHashedPayload = exports.authenticatedHandler = exports.unauthenticatedHandler = exports.fetchTransferHandler = exports.getDnsSuffix = void 0;
|
|
6
|
+
exports.withMemoization = exports.parseMetadata = exports.parseJsonError = exports.parseJsonBody = exports.userAgentMiddlewareFactory = exports.amzSdkRequestHeaderMiddlewareFactory = exports.amzSdkInvocationIdHeaderMiddlewareFactory = exports.retryMiddlewareFactory = exports.jitteredBackoff = exports.getRetryDecider = exports.signingMiddlewareFactory = exports.extendedEncodeURIComponent = exports.EMPTY_SHA256_HASH = exports.signRequest = exports.presignUrl = exports.getHashedPayload = exports.authenticatedHandler = exports.unauthenticatedHandler = exports.fetchTransferHandler = exports.getDnsSuffix = void 0;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
var endpoints_1 = require("./endpoints");
|
|
9
9
|
Object.defineProperty(exports, "getDnsSuffix", { enumerable: true, get: function () { return endpoints_1.getDnsSuffix; } });
|
|
10
10
|
var fetch_1 = require("./handlers/fetch");
|
|
11
11
|
Object.defineProperty(exports, "fetchTransferHandler", { enumerable: true, get: function () { return fetch_1.fetchTransferHandler; } });
|
|
12
|
-
var unauthenticated_1 = require("./handlers/unauthenticated");
|
|
12
|
+
var unauthenticated_1 = require("./handlers/aws/unauthenticated");
|
|
13
13
|
Object.defineProperty(exports, "unauthenticatedHandler", { enumerable: true, get: function () { return unauthenticated_1.unauthenticatedHandler; } });
|
|
14
|
-
var authenticated_1 = require("./handlers/authenticated");
|
|
14
|
+
var authenticated_1 = require("./handlers/aws/authenticated");
|
|
15
15
|
Object.defineProperty(exports, "authenticatedHandler", { enumerable: true, get: function () { return authenticated_1.authenticatedHandler; } });
|
|
16
16
|
var signatureV4_1 = require("./middleware/signing/signer/signatureV4");
|
|
17
17
|
Object.defineProperty(exports, "getHashedPayload", { enumerable: true, get: function () { return signatureV4_1.getHashedPayload; } });
|
|
@@ -27,6 +27,8 @@ var retry_1 = require("./middleware/retry");
|
|
|
27
27
|
Object.defineProperty(exports, "getRetryDecider", { enumerable: true, get: function () { return retry_1.getRetryDecider; } });
|
|
28
28
|
Object.defineProperty(exports, "jitteredBackoff", { enumerable: true, get: function () { return retry_1.jitteredBackoff; } });
|
|
29
29
|
Object.defineProperty(exports, "retryMiddlewareFactory", { enumerable: true, get: function () { return retry_1.retryMiddlewareFactory; } });
|
|
30
|
+
Object.defineProperty(exports, "amzSdkInvocationIdHeaderMiddlewareFactory", { enumerable: true, get: function () { return retry_1.amzSdkInvocationIdHeaderMiddlewareFactory; } });
|
|
31
|
+
Object.defineProperty(exports, "amzSdkRequestHeaderMiddlewareFactory", { enumerable: true, get: function () { return retry_1.amzSdkRequestHeaderMiddlewareFactory; } });
|
|
30
32
|
var userAgent_1 = require("./middleware/userAgent");
|
|
31
33
|
Object.defineProperty(exports, "userAgentMiddlewareFactory", { enumerable: true, get: function () { return userAgent_1.userAgentMiddlewareFactory; } });
|
|
32
34
|
var serde_1 = require("./serde");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/clients/index.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.withMemoization = exports.parseMetadata = exports.parseJsonError = exports.parseJsonBody = exports.userAgentMiddlewareFactory = exports.retryMiddlewareFactory = exports.jitteredBackoff = exports.getRetryDecider = exports.signingMiddlewareFactory = exports.extendedEncodeURIComponent = exports.EMPTY_SHA256_HASH = exports.signRequest = exports.presignUrl = exports.getHashedPayload = exports.authenticatedHandler = exports.unauthenticatedHandler = exports.fetchTransferHandler = exports.getDnsSuffix = void 0;\nconst tslib_1 = require(\"tslib\");\nvar endpoints_1 = require(\"./endpoints\");\nObject.defineProperty(exports, \"getDnsSuffix\", { enumerable: true, get: function () { return endpoints_1.getDnsSuffix; } });\nvar fetch_1 = require(\"./handlers/fetch\");\nObject.defineProperty(exports, \"fetchTransferHandler\", { enumerable: true, get: function () { return fetch_1.fetchTransferHandler; } });\nvar unauthenticated_1 = require(\"./handlers/unauthenticated\");\nObject.defineProperty(exports, \"unauthenticatedHandler\", { enumerable: true, get: function () { return unauthenticated_1.unauthenticatedHandler; } });\nvar authenticated_1 = require(\"./handlers/authenticated\");\nObject.defineProperty(exports, \"authenticatedHandler\", { enumerable: true, get: function () { return authenticated_1.authenticatedHandler; } });\nvar signatureV4_1 = require(\"./middleware/signing/signer/signatureV4\");\nObject.defineProperty(exports, \"getHashedPayload\", { enumerable: true, get: function () { return signatureV4_1.getHashedPayload; } });\nObject.defineProperty(exports, \"presignUrl\", { enumerable: true, get: function () { return signatureV4_1.presignUrl; } });\nObject.defineProperty(exports, \"signRequest\", { enumerable: true, get: function () { return signatureV4_1.signRequest; } });\nvar constants_1 = require(\"./middleware/signing/signer/signatureV4/constants\");\nObject.defineProperty(exports, \"EMPTY_SHA256_HASH\", { enumerable: true, get: function () { return constants_1.EMPTY_HASH; } });\nvar extendedEncodeURIComponent_1 = require(\"./middleware/signing/utils/extendedEncodeURIComponent\");\nObject.defineProperty(exports, \"extendedEncodeURIComponent\", { enumerable: true, get: function () { return extendedEncodeURIComponent_1.extendedEncodeURIComponent; } });\nvar signing_1 = require(\"./middleware/signing\");\nObject.defineProperty(exports, \"signingMiddlewareFactory\", { enumerable: true, get: function () { return signing_1.signingMiddlewareFactory; } });\nvar retry_1 = require(\"./middleware/retry\");\nObject.defineProperty(exports, \"getRetryDecider\", { enumerable: true, get: function () { return retry_1.getRetryDecider; } });\nObject.defineProperty(exports, \"jitteredBackoff\", { enumerable: true, get: function () { return retry_1.jitteredBackoff; } });\nObject.defineProperty(exports, \"retryMiddlewareFactory\", { enumerable: true, get: function () { return retry_1.retryMiddlewareFactory; } });\nvar userAgent_1 = require(\"./middleware/userAgent\");\nObject.defineProperty(exports, \"userAgentMiddlewareFactory\", { enumerable: true, get: function () { return userAgent_1.userAgentMiddlewareFactory; } });\nvar serde_1 = require(\"./serde\");\nObject.defineProperty(exports, \"parseJsonBody\", { enumerable: true, get: function () { return serde_1.parseJsonBody; } });\nObject.defineProperty(exports, \"parseJsonError\", { enumerable: true, get: function () { return serde_1.parseJsonError; } });\nObject.defineProperty(exports, \"parseMetadata\", { enumerable: true, get: function () { return serde_1.parseMetadata; } });\nvar memoization_1 = require(\"./utils/memoization\");\nObject.defineProperty(exports, \"withMemoization\", { enumerable: true, get: function () { return memoization_1.withMemoization; } });\ntslib_1.__exportStar(require(\"./types\"), exports);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/clients/index.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.withMemoization = exports.parseMetadata = exports.parseJsonError = exports.parseJsonBody = exports.userAgentMiddlewareFactory = exports.amzSdkRequestHeaderMiddlewareFactory = exports.amzSdkInvocationIdHeaderMiddlewareFactory = exports.retryMiddlewareFactory = exports.jitteredBackoff = exports.getRetryDecider = exports.signingMiddlewareFactory = exports.extendedEncodeURIComponent = exports.EMPTY_SHA256_HASH = exports.signRequest = exports.presignUrl = exports.getHashedPayload = exports.authenticatedHandler = exports.unauthenticatedHandler = exports.fetchTransferHandler = exports.getDnsSuffix = void 0;\nconst tslib_1 = require(\"tslib\");\nvar endpoints_1 = require(\"./endpoints\");\nObject.defineProperty(exports, \"getDnsSuffix\", { enumerable: true, get: function () { return endpoints_1.getDnsSuffix; } });\nvar fetch_1 = require(\"./handlers/fetch\");\nObject.defineProperty(exports, \"fetchTransferHandler\", { enumerable: true, get: function () { return fetch_1.fetchTransferHandler; } });\nvar unauthenticated_1 = require(\"./handlers/aws/unauthenticated\");\nObject.defineProperty(exports, \"unauthenticatedHandler\", { enumerable: true, get: function () { return unauthenticated_1.unauthenticatedHandler; } });\nvar authenticated_1 = require(\"./handlers/aws/authenticated\");\nObject.defineProperty(exports, \"authenticatedHandler\", { enumerable: true, get: function () { return authenticated_1.authenticatedHandler; } });\nvar signatureV4_1 = require(\"./middleware/signing/signer/signatureV4\");\nObject.defineProperty(exports, \"getHashedPayload\", { enumerable: true, get: function () { return signatureV4_1.getHashedPayload; } });\nObject.defineProperty(exports, \"presignUrl\", { enumerable: true, get: function () { return signatureV4_1.presignUrl; } });\nObject.defineProperty(exports, \"signRequest\", { enumerable: true, get: function () { return signatureV4_1.signRequest; } });\nvar constants_1 = require(\"./middleware/signing/signer/signatureV4/constants\");\nObject.defineProperty(exports, \"EMPTY_SHA256_HASH\", { enumerable: true, get: function () { return constants_1.EMPTY_HASH; } });\nvar extendedEncodeURIComponent_1 = require(\"./middleware/signing/utils/extendedEncodeURIComponent\");\nObject.defineProperty(exports, \"extendedEncodeURIComponent\", { enumerable: true, get: function () { return extendedEncodeURIComponent_1.extendedEncodeURIComponent; } });\nvar signing_1 = require(\"./middleware/signing\");\nObject.defineProperty(exports, \"signingMiddlewareFactory\", { enumerable: true, get: function () { return signing_1.signingMiddlewareFactory; } });\nvar retry_1 = require(\"./middleware/retry\");\nObject.defineProperty(exports, \"getRetryDecider\", { enumerable: true, get: function () { return retry_1.getRetryDecider; } });\nObject.defineProperty(exports, \"jitteredBackoff\", { enumerable: true, get: function () { return retry_1.jitteredBackoff; } });\nObject.defineProperty(exports, \"retryMiddlewareFactory\", { enumerable: true, get: function () { return retry_1.retryMiddlewareFactory; } });\nObject.defineProperty(exports, \"amzSdkInvocationIdHeaderMiddlewareFactory\", { enumerable: true, get: function () { return retry_1.amzSdkInvocationIdHeaderMiddlewareFactory; } });\nObject.defineProperty(exports, \"amzSdkRequestHeaderMiddlewareFactory\", { enumerable: true, get: function () { return retry_1.amzSdkRequestHeaderMiddlewareFactory; } });\nvar userAgent_1 = require(\"./middleware/userAgent\");\nObject.defineProperty(exports, \"userAgentMiddlewareFactory\", { enumerable: true, get: function () { return userAgent_1.userAgentMiddlewareFactory; } });\nvar serde_1 = require(\"./serde\");\nObject.defineProperty(exports, \"parseJsonBody\", { enumerable: true, get: function () { return serde_1.parseJsonBody; } });\nObject.defineProperty(exports, \"parseJsonError\", { enumerable: true, get: function () { return serde_1.parseJsonError; } });\nObject.defineProperty(exports, \"parseMetadata\", { enumerable: true, get: function () { return serde_1.parseMetadata; } });\nvar memoization_1 = require(\"./utils/memoization\");\nObject.defineProperty(exports, \"withMemoization\", { enumerable: true, get: function () { return memoization_1.withMemoization; } });\ntslib_1.__exportStar(require(\"./types\"), exports);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,oCAAoC,GAAG,OAAO,CAAC,yCAAyC,GAAG,OAAO,CAAC,sBAAsB,GAAG,O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AAgB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,OAAO,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC;AAC3H,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;AACzH,IAAI,aAAa,GAAG,OAAO,CAAC,qBAAqB,CAAC;AAClD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,aAAa,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC;AACnI,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.amzSdkInvocationIdHeaderMiddlewareFactory = void 0;
|
|
7
|
+
const libraryUtils_1 = require("../../../libraryUtils");
|
|
8
|
+
const constants_1 = require("./constants");
|
|
9
|
+
/**
|
|
10
|
+
* Middleware injects a UUID string to `amz-sdk-invocation-id` header.
|
|
11
|
+
* if the header is not set already. This header is helpful to provide
|
|
12
|
+
* observability to group the requests caused by automatic retry.
|
|
13
|
+
*
|
|
14
|
+
* This middleware is standalone because of extra UUID dependency, we will
|
|
15
|
+
* NOT use this middleware for API categories.
|
|
16
|
+
*
|
|
17
|
+
* Ref: https://sdk.amazonaws.com/kotlin/api/smithy-kotlin/api/1.0.9/http-client/aws.smithy.kotlin.runtime.http.operation/-http-operation-context/-sdk-invocation-id.html
|
|
18
|
+
*/
|
|
19
|
+
const amzSdkInvocationIdHeaderMiddlewareFactory = () => next => {
|
|
20
|
+
return async function amzSdkInvocationIdHeaderMiddleware(request) {
|
|
21
|
+
if (!request.headers[constants_1.AMZ_SDK_INVOCATION_ID_HEADER]) {
|
|
22
|
+
request.headers[constants_1.AMZ_SDK_INVOCATION_ID_HEADER] = (0, libraryUtils_1.amplifyUuid)();
|
|
23
|
+
}
|
|
24
|
+
return next(request);
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
exports.amzSdkInvocationIdHeaderMiddlewareFactory = amzSdkInvocationIdHeaderMiddlewareFactory;
|
|
28
|
+
//# sourceMappingURL=amzSdkInvocationIdHeaderMiddleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amzSdkInvocationIdHeaderMiddleware.js","sources":["../../../../../src/clients/middleware/retry/amzSdkInvocationIdHeaderMiddleware.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.amzSdkInvocationIdHeaderMiddlewareFactory = void 0;\nconst libraryUtils_1 = require(\"../../../libraryUtils\");\nconst constants_1 = require(\"./constants\");\n/**\n * Middleware injects a UUID string to `amz-sdk-invocation-id` header.\n * if the header is not set already. This header is helpful to provide\n * observability to group the requests caused by automatic retry.\n *\n * This middleware is standalone because of extra UUID dependency, we will\n * NOT use this middleware for API categories.\n *\n * Ref: https://sdk.amazonaws.com/kotlin/api/smithy-kotlin/api/1.0.9/http-client/aws.smithy.kotlin.runtime.http.operation/-http-operation-context/-sdk-invocation-id.html\n */\nconst amzSdkInvocationIdHeaderMiddlewareFactory = () => next => {\n return async function amzSdkInvocationIdHeaderMiddleware(request) {\n if (!request.headers[constants_1.AMZ_SDK_INVOCATION_ID_HEADER]) {\n request.headers[constants_1.AMZ_SDK_INVOCATION_ID_HEADER] = (0, libraryUtils_1.amplifyUuid)();\n }\n return next(request);\n };\n};\nexports.amzSdkInvocationIdHeaderMiddlewareFactory = amzSdkInvocationIdHeaderMiddlewareFactory;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,yCAAyC,GAAG,MAAM;AAC1D,MAAM,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC;AACvD,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,yCAAyC,GAAG,MAAM,IAAI,IAAI;AAChE,IAAI,OAAO,eAAe,kCAAkC,CAAC,OAAO,EAAE;AACtE,QAAQ,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,4BAA4B,CAAC,EAAE;AACxE,YAAY,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,4BAA4B,CAAC,GAAG,IAAI,cAAc,CAAC,WAAW,GAAG;AACzG;AACA,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC;AAC5B,KAAK;AACL,CAAC;AACD,OAAO,CAAC,yCAAyC,GAAG,yCAAyC;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.amzSdkRequestHeaderMiddlewareFactory = void 0;
|
|
7
|
+
const constants_1 = require("./constants");
|
|
8
|
+
/**
|
|
9
|
+
* Middleware injects `amz-sdk-request` header to indicate the retry state at the time an HTTP request is made.
|
|
10
|
+
* This middleware should co-exist with retryMiddleware as it relies on the retryAttempts value in middleware context
|
|
11
|
+
* set by the retry middleware.
|
|
12
|
+
*
|
|
13
|
+
* Example header: `amz-sdk-request: attempt=1; max=3`.
|
|
14
|
+
*
|
|
15
|
+
* This middleware is standalone because of extra headers may conflict with custom endpoint settings(e.g. CORS), we will
|
|
16
|
+
* NOT use this middleware for API categories.
|
|
17
|
+
*/
|
|
18
|
+
const amzSdkRequestHeaderMiddlewareFactory = ({ maxAttempts = constants_1.DEFAULT_RETRY_ATTEMPTS }) => (next, context) => {
|
|
19
|
+
return async function amzSdkRequestHeaderMiddleware(request) {
|
|
20
|
+
const attemptsCount = context.attemptsCount ?? 0;
|
|
21
|
+
request.headers[constants_1.AMZ_SDK_REQUEST_HEADER] =
|
|
22
|
+
`attempt=${attemptsCount + 1}; max=${maxAttempts}`;
|
|
23
|
+
return next(request);
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
exports.amzSdkRequestHeaderMiddlewareFactory = amzSdkRequestHeaderMiddlewareFactory;
|
|
27
|
+
//# sourceMappingURL=amzSdkRequestHeaderMiddleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amzSdkRequestHeaderMiddleware.js","sources":["../../../../../src/clients/middleware/retry/amzSdkRequestHeaderMiddleware.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.amzSdkRequestHeaderMiddlewareFactory = void 0;\nconst constants_1 = require(\"./constants\");\n/**\n * Middleware injects `amz-sdk-request` header to indicate the retry state at the time an HTTP request is made.\n * This middleware should co-exist with retryMiddleware as it relies on the retryAttempts value in middleware context\n * set by the retry middleware.\n *\n * Example header: `amz-sdk-request: attempt=1; max=3`.\n *\n * This middleware is standalone because of extra headers may conflict with custom endpoint settings(e.g. CORS), we will\n * NOT use this middleware for API categories.\n */\nconst amzSdkRequestHeaderMiddlewareFactory = ({ maxAttempts = constants_1.DEFAULT_RETRY_ATTEMPTS }) => (next, context) => {\n return async function amzSdkRequestHeaderMiddleware(request) {\n const attemptsCount = context.attemptsCount ?? 0;\n request.headers[constants_1.AMZ_SDK_REQUEST_HEADER] =\n `attempt=${attemptsCount + 1}; max=${maxAttempts}`;\n return next(request);\n };\n};\nexports.amzSdkRequestHeaderMiddlewareFactory = amzSdkRequestHeaderMiddlewareFactory;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oCAAoC,GAAG,MAAM;AACrD,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,oCAAoC,GAAG,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,sBAAsB,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,KAAK;AAC1H,IAAI,OAAO,eAAe,6BAA6B,CAAC,OAAO,EAAE;AACjE,QAAQ,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,CAAC;AACxD,QAAQ,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC;AAC3D,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAC9D,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC;AAC5B,KAAK;AACL,CAAC;AACD,OAAO,CAAC,oCAAoC,GAAG,oCAAoC;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DEFAULT_MAX_DELAY_MS = exports.AMZ_SDK_REQUEST_HEADER = exports.AMZ_SDK_INVOCATION_ID_HEADER = exports.DEFAULT_RETRY_ATTEMPTS = void 0;
|
|
7
|
+
exports.DEFAULT_RETRY_ATTEMPTS = 3;
|
|
8
|
+
exports.AMZ_SDK_INVOCATION_ID_HEADER = 'amz-sdk-invocation-id';
|
|
9
|
+
exports.AMZ_SDK_REQUEST_HEADER = 'amz-sdk-request';
|
|
10
|
+
exports.DEFAULT_MAX_DELAY_MS = 5 * 60 * 1000;
|
|
11
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../src/clients/middleware/retry/constants.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.DEFAULT_MAX_DELAY_MS = exports.AMZ_SDK_REQUEST_HEADER = exports.AMZ_SDK_INVOCATION_ID_HEADER = exports.DEFAULT_RETRY_ATTEMPTS = void 0;\nexports.DEFAULT_RETRY_ATTEMPTS = 3;\nexports.AMZ_SDK_INVOCATION_ID_HEADER = 'amz-sdk-invocation-id';\nexports.AMZ_SDK_REQUEST_HEADER = 'amz-sdk-request';\nexports.DEFAULT_MAX_DELAY_MS = 5 * 60 * 1000;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,4BAA4B,GAAG,OAAO,CAAC,sBAAsB,GAAG,MAAM;AAC9I,OAAO,CAAC,sBAAsB,GAAG,CAAC;AAClC,OAAO,CAAC,4BAA4B,GAAG,uBAAuB;AAC9D,OAAO,CAAC,sBAAsB,GAAG,iBAAiB;AAClD,OAAO,CAAC,oBAAoB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI;;"}
|
|
@@ -3,11 +3,15 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getRetryDecider = exports.jitteredBackoff = exports.retryMiddlewareFactory = void 0;
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "retryMiddlewareFactory", { enumerable: true, get: function () { return
|
|
6
|
+
exports.amzSdkRequestHeaderMiddlewareFactory = exports.amzSdkInvocationIdHeaderMiddlewareFactory = exports.getRetryDecider = exports.jitteredBackoff = exports.retryMiddlewareFactory = void 0;
|
|
7
|
+
var retryMiddleware_1 = require("./retryMiddleware");
|
|
8
|
+
Object.defineProperty(exports, "retryMiddlewareFactory", { enumerable: true, get: function () { return retryMiddleware_1.retryMiddlewareFactory; } });
|
|
9
9
|
var jitteredBackoff_1 = require("./jitteredBackoff");
|
|
10
10
|
Object.defineProperty(exports, "jitteredBackoff", { enumerable: true, get: function () { return jitteredBackoff_1.jitteredBackoff; } });
|
|
11
11
|
var defaultRetryDecider_1 = require("./defaultRetryDecider");
|
|
12
12
|
Object.defineProperty(exports, "getRetryDecider", { enumerable: true, get: function () { return defaultRetryDecider_1.getRetryDecider; } });
|
|
13
|
+
var amzSdkInvocationIdHeaderMiddleware_1 = require("./amzSdkInvocationIdHeaderMiddleware");
|
|
14
|
+
Object.defineProperty(exports, "amzSdkInvocationIdHeaderMiddlewareFactory", { enumerable: true, get: function () { return amzSdkInvocationIdHeaderMiddleware_1.amzSdkInvocationIdHeaderMiddlewareFactory; } });
|
|
15
|
+
var amzSdkRequestHeaderMiddleware_1 = require("./amzSdkRequestHeaderMiddleware");
|
|
16
|
+
Object.defineProperty(exports, "amzSdkRequestHeaderMiddlewareFactory", { enumerable: true, get: function () { return amzSdkRequestHeaderMiddleware_1.amzSdkRequestHeaderMiddlewareFactory; } });
|
|
13
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/clients/middleware/retry/index.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 = exports.jitteredBackoff = exports.retryMiddlewareFactory = void 0;\nvar
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/clients/middleware/retry/index.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.amzSdkRequestHeaderMiddlewareFactory = exports.amzSdkInvocationIdHeaderMiddlewareFactory = exports.getRetryDecider = exports.jitteredBackoff = exports.retryMiddlewareFactory = void 0;\nvar retryMiddleware_1 = require(\"./retryMiddleware\");\nObject.defineProperty(exports, \"retryMiddlewareFactory\", { enumerable: true, get: function () { return retryMiddleware_1.retryMiddlewareFactory; } });\nvar jitteredBackoff_1 = require(\"./jitteredBackoff\");\nObject.defineProperty(exports, \"jitteredBackoff\", { enumerable: true, get: function () { return jitteredBackoff_1.jitteredBackoff; } });\nvar defaultRetryDecider_1 = require(\"./defaultRetryDecider\");\nObject.defineProperty(exports, \"getRetryDecider\", { enumerable: true, get: function () { return defaultRetryDecider_1.getRetryDecider; } });\nvar amzSdkInvocationIdHeaderMiddleware_1 = require(\"./amzSdkInvocationIdHeaderMiddleware\");\nObject.defineProperty(exports, \"amzSdkInvocationIdHeaderMiddlewareFactory\", { enumerable: true, get: function () { return amzSdkInvocationIdHeaderMiddleware_1.amzSdkInvocationIdHeaderMiddlewareFactory; } });\nvar amzSdkRequestHeaderMiddleware_1 = require(\"./amzSdkRequestHeaderMiddleware\");\nObject.defineProperty(exports, \"amzSdkRequestHeaderMiddlewareFactory\", { enumerable: true, get: function () { return amzSdkRequestHeaderMiddleware_1.amzSdkRequest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AO,EAAE,sCAAsC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,+BAA+B,CAAC,oCAAoC,CAAC,EAAE,EAAE,CAAC;;"}
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.jitteredBackoff = void 0;
|
|
7
7
|
const utils_1 = require("../../../utils");
|
|
8
|
+
const constants_1 = require("./constants");
|
|
8
9
|
// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.
|
|
9
|
-
const DEFAULT_MAX_DELAY_MS = 5 * 60 * 1000;
|
|
10
10
|
const jitteredBackoff = attempt => {
|
|
11
|
-
const delayFunction = (0, utils_1.jitteredBackoff)(DEFAULT_MAX_DELAY_MS);
|
|
11
|
+
const delayFunction = (0, utils_1.jitteredBackoff)(constants_1.DEFAULT_MAX_DELAY_MS);
|
|
12
12
|
const delay = delayFunction(attempt);
|
|
13
13
|
// The delayFunction returns false when the delay is greater than the max delay(5 mins).
|
|
14
14
|
// In this case, the retry middleware will delay 5 mins instead, as a ceiling of the delay.
|
|
15
|
-
return delay === false ? DEFAULT_MAX_DELAY_MS : delay;
|
|
15
|
+
return delay === false ? constants_1.DEFAULT_MAX_DELAY_MS : delay;
|
|
16
16
|
};
|
|
17
17
|
exports.jitteredBackoff = jitteredBackoff;
|
|
18
18
|
//# sourceMappingURL=jitteredBackoff.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jitteredBackoff.js","sources":["../../../../../src/clients/middleware/retry/jitteredBackoff.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.jitteredBackoff = void 0;\nconst utils_1 = require(\"../../../utils\");\n// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.\nconst
|
|
1
|
+
{"version":3,"file":"jitteredBackoff.js","sources":["../../../../../src/clients/middleware/retry/jitteredBackoff.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.jitteredBackoff = void 0;\nconst utils_1 = require(\"../../../utils\");\nconst constants_1 = require(\"./constants\");\n// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.\nconst jitteredBackoff = attempt => {\n const delayFunction = (0, utils_1.jitteredBackoff)(constants_1.DEFAULT_MAX_DELAY_MS);\n const delay = delayFunction(attempt);\n // The delayFunction returns false when the delay is greater than the max delay(5 mins).\n // In this case, the retry middleware will delay 5 mins instead, as a ceiling of the delay.\n return delay === false ? constants_1.DEFAULT_MAX_DELAY_MS : delay;\n};\nexports.jitteredBackoff = jitteredBackoff;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,MAAM;AAChC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AAC1C;AACA,MAAM,eAAe,GAAG,OAAO,IAAI;AACnC,IAAI,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,eAAe,EAAE,WAAW,CAAC,oBAAoB,CAAC;AACxF,IAAI,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC;AACxC;AACA;AACA,IAAI,OAAO,KAAK,KAAK,KAAK,GAAG,WAAW,CAAC,oBAAoB,GAAG,KAAK;AACrE,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,eAAe;;"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
4
|
exports.retryMiddlewareFactory = void 0;
|
|
7
|
-
const
|
|
5
|
+
const constants_1 = require("./constants");
|
|
8
6
|
/**
|
|
9
|
-
*
|
|
7
|
+
* Middleware that executes the retry logic.
|
|
10
8
|
*/
|
|
11
|
-
const retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDecider, computeDelay, abortSignal, }) => {
|
|
9
|
+
const retryMiddlewareFactory = ({ maxAttempts = constants_1.DEFAULT_RETRY_ATTEMPTS, retryDecider, computeDelay, abortSignal, }) => {
|
|
12
10
|
if (maxAttempts < 1) {
|
|
13
11
|
throw new Error('maxAttempts must be greater than 0');
|
|
14
12
|
}
|
|
@@ -92,4 +90,4 @@ const addOrIncrementMetadataAttempts = (nextHandlerOutput, attempts) => {
|
|
|
92
90
|
attempts,
|
|
93
91
|
};
|
|
94
92
|
};
|
|
95
|
-
//# sourceMappingURL=
|
|
93
|
+
//# sourceMappingURL=retryMiddleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retryMiddleware.js","sources":["../../../../../src/clients/middleware/retry/retryMiddleware.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryMiddlewareFactory = void 0;\nconst constants_1 = require(\"./constants\");\n/**\n * Middleware that executes the retry logic.\n */\nconst retryMiddlewareFactory = ({ maxAttempts = constants_1.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,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,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AAE;AACnE,QAAQ,YAAY,CAAC,SAAS,CAAC;AAC/B,QAAQ,WAAW,EAAE,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC;AAC9D,QAAQ,qBAAqB,EAAE;AAC/B,KAAK,CAAC;AACN,IAAI,OAAO,YAAY;AACvB,CAAC;AACD,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;AACR;AACA,IAAI,iBAAiB,CAAC,SAAS,GAAG;AAClC,QAAQ,IAAI,iBAAiB,CAAC,SAAS,IAAI,EAAE,CAAC;AAC9C,QAAQ,QAAQ;AAChB,KAAK;AACL,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws.js","sources":["../../../../src/clients/types/aws.ts"],"sourcesContent":["\"use strict\";\
|
|
1
|
+
{"version":3,"file":"aws.js","sources":["../../../../src/clients/types/aws.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
4
|
exports.AmplifyError = void 0;
|
|
7
5
|
class AmplifyError extends Error {
|
|
@@ -13,11 +11,16 @@ class AmplifyError extends Error {
|
|
|
13
11
|
* @param recoverySuggestion suggestion to recover from the error.
|
|
14
12
|
*
|
|
15
13
|
*/
|
|
16
|
-
constructor({ message, name, recoverySuggestion, underlyingError, }) {
|
|
14
|
+
constructor({ message, name, recoverySuggestion, underlyingError, metadata, }) {
|
|
17
15
|
super(message);
|
|
18
16
|
this.name = name;
|
|
19
17
|
this.underlyingError = underlyingError;
|
|
20
18
|
this.recoverySuggestion = recoverySuggestion;
|
|
19
|
+
if (metadata) {
|
|
20
|
+
// If metadata exists, explicitly only record the following properties.
|
|
21
|
+
const { extendedRequestId, httpStatusCode, requestId } = metadata;
|
|
22
|
+
this.metadata = { extendedRequestId, httpStatusCode, requestId };
|
|
23
|
+
}
|
|
21
24
|
// Hack for making the custom error class work when transpiled to es5
|
|
22
25
|
// TODO: Delete the following 2 lines after we change the build target to >= es2015
|
|
23
26
|
this.constructor = AmplifyError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmplifyError.js","sources":["../../../src/errors/AmplifyError.ts"],"sourcesContent":["\"use strict\";\
|
|
1
|
+
{"version":3,"file":"AmplifyError.js","sources":["../../../src/errors/AmplifyError.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AmplifyError = void 0;\nclass AmplifyError extends Error {\n /**\n * Constructs an AmplifyError.\n *\n * @param message text that describes the main problem.\n * @param underlyingError the underlying cause of the error.\n * @param recoverySuggestion suggestion to recover from the error.\n *\n */\n constructor({ message, name, recoverySuggestion, underlyingError, metadata, }) {\n super(message);\n this.name = name;\n this.underlyingError = underlyingError;\n this.recoverySuggestion = recoverySuggestion;\n if (metadata) {\n // If metadata exists, explicitly only record the following properties.\n const { extendedRequestId, httpStatusCode, requestId } = metadata;\n this.metadata = { extendedRequestId, httpStatusCode, requestId };\n }\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AmplifyError;\n Object.setPrototypeOf(this, AmplifyError.prototype);\n }\n}\nexports.AmplifyError = AmplifyError;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,MAAM;AAC7B,MAAM,YAAY,SAAS,KAAK,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,eAAe,EAAE,QAAQ,GAAG,EAAE;AACnF,QAAQ,KAAK,CAAC,OAAO,CAAC;AACtB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe;AAC9C,QAAQ,IAAI,CAAC,kBAAkB,GAAG,kBAAkB;AACpD,QAAQ,IAAI,QAAQ,EAAE;AACtB;AACA,YAAY,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,QAAQ;AAC7E,YAAY,IAAI,CAAC,QAAQ,GAAG,EAAE,iBAAiB,EAAE,cAAc,EAAE,SAAS,EAAE;AAC5E;AACA;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,YAAY;AACvC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC;AAC3D;AACA;AACA,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
|
package/dist/cjs/types/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../../src/types/errors.ts"],"sourcesContent":["\"use strict\";\
|
|
1
|
+
{"version":3,"file":"errors.js","sources":["../../../src/types/errors.ts"],"sourcesContent":["\"use strict\";\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,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gBAAgB,GAAG,MAAM;AAEjC,CAAC,UAAU,gBAAgB,EAAE;AAC7B,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,cAAc;AACrD,IAAI,gBAAgB,CAAC,sBAAsB,CAAC,GAAG,sBAAsB;AACrE,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;AAC3C,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,cAAc;AACrD,CAAC,EAAqB,OAAO,CAAC,gBAAgB,KAAK,OAAO,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.13.
|
|
1
|
+
export declare const version = "6.13.7-unstable.b188564.0+b188564";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.13.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.13.7-unstable.b188564.0+b188564';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -5,11 +5,19 @@ import '../errors/errorHelpers.mjs';
|
|
|
5
5
|
import '../utils/getClientInfo/getClientInfo.mjs';
|
|
6
6
|
import { isBrowser } from '../utils/isBrowser.mjs';
|
|
7
7
|
import '../utils/retry/retry.mjs';
|
|
8
|
+
import '../parseAWSExports.mjs';
|
|
9
|
+
import 'uuid';
|
|
10
|
+
import '../singleton/Auth/utils/errorHelpers.mjs';
|
|
8
11
|
import '@aws-crypto/sha256-js';
|
|
9
12
|
import '@smithy/util-hex-encoding';
|
|
13
|
+
import '../Platform/index.mjs';
|
|
14
|
+
import '../Platform/types.mjs';
|
|
15
|
+
import '../BackgroundProcessManager/types.mjs';
|
|
16
|
+
import '../Reachability/Reachability.mjs';
|
|
17
|
+
import '../Hub/index.mjs';
|
|
18
|
+
import '../utils/sessionListener/index.mjs';
|
|
10
19
|
import '../awsClients/pinpoint/base.mjs';
|
|
11
20
|
import '../awsClients/pinpoint/errorHelpers.mjs';
|
|
12
|
-
import 'uuid';
|
|
13
21
|
import '../Cache/index.mjs';
|
|
14
22
|
import { record } from '../providers/pinpoint/apis/record.mjs';
|
|
15
23
|
import '../providers/pinpoint/utils/PinpointEventBuffer.mjs';
|