diff --git a/clients/client-accessanalyzer/package.json b/clients/client-accessanalyzer/package.json index 2d0303c8d89f..e575aeb5e9d0 100644 --- a/clients/client-accessanalyzer/package.json +++ b/clients/client-accessanalyzer/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts b/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts index fefb884cdac4..76edddce136f 100644 --- a/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts +++ b/clients/client-accessanalyzer/src/AccessAnalyzerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -200,11 +200,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-accessanalyzer/src/runtimeConfig.browser.ts b/clients/client-accessanalyzer/src/runtimeConfig.browser.ts index 6881c2568f0d..834937c58ffb 100644 --- a/clients/client-accessanalyzer/src/runtimeConfig.browser.ts +++ b/clients/client-accessanalyzer/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AccessAnalyzerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-accessanalyzer/src/runtimeConfig.ts b/clients/client-accessanalyzer/src/runtimeConfig.ts index 7f12fe4c2aec..b6d7bb196568 100644 --- a/clients/client-accessanalyzer/src/runtimeConfig.ts +++ b/clients/client-accessanalyzer/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AccessAnalyzerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-account/package.json b/clients/client-account/package.json index 251d420785e1..0e2c11ef0fac 100644 --- a/clients/client-account/package.json +++ b/clients/client-account/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-account/src/AccountClient.ts b/clients/client-account/src/AccountClient.ts index 1eb8887dc1c6..407868662410 100644 --- a/clients/client-account/src/AccountClient.ts +++ b/clients/client-account/src/AccountClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -119,11 +119,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-account/src/runtimeConfig.browser.ts b/clients/client-account/src/runtimeConfig.browser.ts index b7e9df3ac6ee..4b6f94e73ad4 100644 --- a/clients/client-account/src/runtimeConfig.browser.ts +++ b/clients/client-account/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AccountClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-account/src/runtimeConfig.ts b/clients/client-account/src/runtimeConfig.ts index a8ccd749fd97..52c811c841e3 100644 --- a/clients/client-account/src/runtimeConfig.ts +++ b/clients/client-account/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AccountClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-acm-pca/package.json b/clients/client-acm-pca/package.json index 1fc87c497a0d..0470bb388979 100644 --- a/clients/client-acm-pca/package.json +++ b/clients/client-acm-pca/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-acm-pca/src/ACMPCAClient.ts b/clients/client-acm-pca/src/ACMPCAClient.ts index 2bab991b0675..d81ea35bde12 100644 --- a/clients/client-acm-pca/src/ACMPCAClient.ts +++ b/clients/client-acm-pca/src/ACMPCAClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -185,11 +185,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-acm-pca/src/runtimeConfig.browser.ts b/clients/client-acm-pca/src/runtimeConfig.browser.ts index f28318596516..a90a40b4172e 100644 --- a/clients/client-acm-pca/src/runtimeConfig.browser.ts +++ b/clients/client-acm-pca/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ACMPCAClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-acm-pca/src/runtimeConfig.ts b/clients/client-acm-pca/src/runtimeConfig.ts index 17190a0db891..1d0f72e2354f 100644 --- a/clients/client-acm-pca/src/runtimeConfig.ts +++ b/clients/client-acm-pca/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ACMPCAClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-acm/package.json b/clients/client-acm/package.json index ff2318fcfebf..b00f9413d048 100644 --- a/clients/client-acm/package.json +++ b/clients/client-acm/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-acm/src/ACMClient.ts b/clients/client-acm/src/ACMClient.ts index ac1bac27f262..38ba14666e7b 100644 --- a/clients/client-acm/src/ACMClient.ts +++ b/clients/client-acm/src/ACMClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -146,11 +146,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-acm/src/runtimeConfig.browser.ts b/clients/client-acm/src/runtimeConfig.browser.ts index 342a8aa13221..45d34b1a7498 100644 --- a/clients/client-acm/src/runtimeConfig.browser.ts +++ b/clients/client-acm/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ACMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-acm/src/runtimeConfig.ts b/clients/client-acm/src/runtimeConfig.ts index 2fb4410322c4..d40c10db5d5e 100644 --- a/clients/client-acm/src/runtimeConfig.ts +++ b/clients/client-acm/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ACMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-alexa-for-business/package.json b/clients/client-alexa-for-business/package.json index 4ba032b8a4af..3f88196fea09 100644 --- a/clients/client-alexa-for-business/package.json +++ b/clients/client-alexa-for-business/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-alexa-for-business/src/AlexaForBusinessClient.ts b/clients/client-alexa-for-business/src/AlexaForBusinessClient.ts index 5b404d4dac57..18a2efa5de0a 100644 --- a/clients/client-alexa-for-business/src/AlexaForBusinessClient.ts +++ b/clients/client-alexa-for-business/src/AlexaForBusinessClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -473,11 +473,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-alexa-for-business/src/runtimeConfig.browser.ts b/clients/client-alexa-for-business/src/runtimeConfig.browser.ts index d0d800bacbad..cb7fd60ce03a 100644 --- a/clients/client-alexa-for-business/src/runtimeConfig.browser.ts +++ b/clients/client-alexa-for-business/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AlexaForBusinessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-alexa-for-business/src/runtimeConfig.ts b/clients/client-alexa-for-business/src/runtimeConfig.ts index b538f34d3ec3..e713efbf38b1 100644 --- a/clients/client-alexa-for-business/src/runtimeConfig.ts +++ b/clients/client-alexa-for-business/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AlexaForBusinessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-amp/package.json b/clients/client-amp/package.json index df4e44c96f10..9bed4cfeae8b 100644 --- a/clients/client-amp/package.json +++ b/clients/client-amp/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-amp/src/AmpClient.ts b/clients/client-amp/src/AmpClient.ts index 1cde388f256a..6c54df67813f 100644 --- a/clients/client-amp/src/AmpClient.ts +++ b/clients/client-amp/src/AmpClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -203,11 +203,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-amp/src/runtimeConfig.browser.ts b/clients/client-amp/src/runtimeConfig.browser.ts index b1d78c213ab0..4576e6875eb0 100644 --- a/clients/client-amp/src/runtimeConfig.browser.ts +++ b/clients/client-amp/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AmpClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-amp/src/runtimeConfig.ts b/clients/client-amp/src/runtimeConfig.ts index 87def006215f..e705754fbf5f 100644 --- a/clients/client-amp/src/runtimeConfig.ts +++ b/clients/client-amp/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AmpClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-amplify/package.json b/clients/client-amplify/package.json index 152868f1899a..b26c7755ba6c 100644 --- a/clients/client-amplify/package.json +++ b/clients/client-amplify/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-amplify/src/AmplifyClient.ts b/clients/client-amplify/src/AmplifyClient.ts index 1fde122066ad..7e7aa61c3a80 100644 --- a/clients/client-amplify/src/AmplifyClient.ts +++ b/clients/client-amplify/src/AmplifyClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -218,11 +218,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-amplify/src/runtimeConfig.browser.ts b/clients/client-amplify/src/runtimeConfig.browser.ts index 471221eb3d28..5dd97461b9bf 100644 --- a/clients/client-amplify/src/runtimeConfig.browser.ts +++ b/clients/client-amplify/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AmplifyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-amplify/src/runtimeConfig.ts b/clients/client-amplify/src/runtimeConfig.ts index af605eecfdc2..3d1ccd20955f 100644 --- a/clients/client-amplify/src/runtimeConfig.ts +++ b/clients/client-amplify/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AmplifyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-amplifybackend/package.json b/clients/client-amplifybackend/package.json index 5abc0e0ed24f..7873633d4040 100644 --- a/clients/client-amplifybackend/package.json +++ b/clients/client-amplifybackend/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-amplifybackend/src/AmplifyBackendClient.ts b/clients/client-amplifybackend/src/AmplifyBackendClient.ts index 4be955eea0f3..6ca3129ab9af 100644 --- a/clients/client-amplifybackend/src/AmplifyBackendClient.ts +++ b/clients/client-amplifybackend/src/AmplifyBackendClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -197,11 +197,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-amplifybackend/src/runtimeConfig.browser.ts b/clients/client-amplifybackend/src/runtimeConfig.browser.ts index d86079575f4d..73024b83ede8 100644 --- a/clients/client-amplifybackend/src/runtimeConfig.browser.ts +++ b/clients/client-amplifybackend/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AmplifyBackendClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-amplifybackend/src/runtimeConfig.ts b/clients/client-amplifybackend/src/runtimeConfig.ts index e6fa409b8b01..7b0b01910005 100644 --- a/clients/client-amplifybackend/src/runtimeConfig.ts +++ b/clients/client-amplifybackend/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AmplifyBackendClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-amplifyuibuilder/package.json b/clients/client-amplifyuibuilder/package.json index 6475c2c76a64..216edb46e80f 100644 --- a/clients/client-amplifyuibuilder/package.json +++ b/clients/client-amplifyuibuilder/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-amplifyuibuilder/src/AmplifyUIBuilderClient.ts b/clients/client-amplifyuibuilder/src/AmplifyUIBuilderClient.ts index 78b1ce3177ed..fadb4ac4ea2b 100644 --- a/clients/client-amplifyuibuilder/src/AmplifyUIBuilderClient.ts +++ b/clients/client-amplifyuibuilder/src/AmplifyUIBuilderClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -155,11 +155,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-amplifyuibuilder/src/runtimeConfig.browser.ts b/clients/client-amplifyuibuilder/src/runtimeConfig.browser.ts index d19a7444878a..1966e5817875 100644 --- a/clients/client-amplifyuibuilder/src/runtimeConfig.browser.ts +++ b/clients/client-amplifyuibuilder/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AmplifyUIBuilderClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-amplifyuibuilder/src/runtimeConfig.ts b/clients/client-amplifyuibuilder/src/runtimeConfig.ts index 9dbaf147a2fb..224e2c866c3b 100644 --- a/clients/client-amplifyuibuilder/src/runtimeConfig.ts +++ b/clients/client-amplifyuibuilder/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AmplifyUIBuilderClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-api-gateway/package.json b/clients/client-api-gateway/package.json index b144459c14d4..c7a3e58c06c4 100644 --- a/clients/client-api-gateway/package.json +++ b/clients/client-api-gateway/package.json @@ -33,31 +33,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-api-gateway/src/APIGatewayClient.ts b/clients/client-api-gateway/src/APIGatewayClient.ts index cdea61283929..13a02e204616 100644 --- a/clients/client-api-gateway/src/APIGatewayClient.ts +++ b/clients/client-api-gateway/src/APIGatewayClient.ts @@ -23,7 +23,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -546,11 +546,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-api-gateway/src/runtimeConfig.browser.ts b/clients/client-api-gateway/src/runtimeConfig.browser.ts index ab847401485d..038da77a7155 100644 --- a/clients/client-api-gateway/src/runtimeConfig.browser.ts +++ b/clients/client-api-gateway/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: APIGatewayClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-api-gateway/src/runtimeConfig.ts b/clients/client-api-gateway/src/runtimeConfig.ts index df7c7f2c62e3..6f780949c155 100644 --- a/clients/client-api-gateway/src/runtimeConfig.ts +++ b/clients/client-api-gateway/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: APIGatewayClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-apigatewaymanagementapi/package.json b/clients/client-apigatewaymanagementapi/package.json index 0a4fc2199aa3..39e7b1220a11 100644 --- a/clients/client-apigatewaymanagementapi/package.json +++ b/clients/client-apigatewaymanagementapi/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-apigatewaymanagementapi/src/ApiGatewayManagementApiClient.ts b/clients/client-apigatewaymanagementapi/src/ApiGatewayManagementApiClient.ts index 9001d2ab470d..90feb010711f 100644 --- a/clients/client-apigatewaymanagementapi/src/ApiGatewayManagementApiClient.ts +++ b/clients/client-apigatewaymanagementapi/src/ApiGatewayManagementApiClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -83,11 +83,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-apigatewaymanagementapi/src/runtimeConfig.browser.ts b/clients/client-apigatewaymanagementapi/src/runtimeConfig.browser.ts index f876f3525db5..fa745f48be91 100644 --- a/clients/client-apigatewaymanagementapi/src/runtimeConfig.browser.ts +++ b/clients/client-apigatewaymanagementapi/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ApiGatewayManagementApiClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-apigatewaymanagementapi/src/runtimeConfig.ts b/clients/client-apigatewaymanagementapi/src/runtimeConfig.ts index e3013bd7716e..1ce07013c88d 100644 --- a/clients/client-apigatewaymanagementapi/src/runtimeConfig.ts +++ b/clients/client-apigatewaymanagementapi/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ApiGatewayManagementApiClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-apigatewayv2/package.json b/clients/client-apigatewayv2/package.json index 561a938ecf51..651db9338099 100644 --- a/clients/client-apigatewayv2/package.json +++ b/clients/client-apigatewayv2/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-apigatewayv2/src/ApiGatewayV2Client.ts b/clients/client-apigatewayv2/src/ApiGatewayV2Client.ts index 011e51584fde..2d1cdb07e34b 100644 --- a/clients/client-apigatewayv2/src/ApiGatewayV2Client.ts +++ b/clients/client-apigatewayv2/src/ApiGatewayV2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -332,11 +332,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-apigatewayv2/src/runtimeConfig.browser.ts b/clients/client-apigatewayv2/src/runtimeConfig.browser.ts index 8dc5af9ea2f1..d9d3dc4dee9f 100644 --- a/clients/client-apigatewayv2/src/runtimeConfig.browser.ts +++ b/clients/client-apigatewayv2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ApiGatewayV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-apigatewayv2/src/runtimeConfig.ts b/clients/client-apigatewayv2/src/runtimeConfig.ts index 86cfda97a55c..aee7c4f6f28a 100644 --- a/clients/client-apigatewayv2/src/runtimeConfig.ts +++ b/clients/client-apigatewayv2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ApiGatewayV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-app-mesh/package.json b/clients/client-app-mesh/package.json index fbcdae030fa8..6c278a23c641 100644 --- a/clients/client-app-mesh/package.json +++ b/clients/client-app-mesh/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-app-mesh/src/AppMeshClient.ts b/clients/client-app-mesh/src/AppMeshClient.ts index 0166d22aa536..604ccb55fd95 100644 --- a/clients/client-app-mesh/src/AppMeshClient.ts +++ b/clients/client-app-mesh/src/AppMeshClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -242,11 +242,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-app-mesh/src/runtimeConfig.browser.ts b/clients/client-app-mesh/src/runtimeConfig.browser.ts index 1309dc948bc4..629f409b1d36 100644 --- a/clients/client-app-mesh/src/runtimeConfig.browser.ts +++ b/clients/client-app-mesh/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AppMeshClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-app-mesh/src/runtimeConfig.ts b/clients/client-app-mesh/src/runtimeConfig.ts index 4069be572a1a..c7b4eb797897 100644 --- a/clients/client-app-mesh/src/runtimeConfig.ts +++ b/clients/client-app-mesh/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AppMeshClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-appconfig/package.json b/clients/client-appconfig/package.json index 99996d127134..d8c4158baca1 100644 --- a/clients/client-appconfig/package.json +++ b/clients/client-appconfig/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-appconfig/src/AppConfigClient.ts b/clients/client-appconfig/src/AppConfigClient.ts index c7e4872e6ad6..2625250c368d 100644 --- a/clients/client-appconfig/src/AppConfigClient.ts +++ b/clients/client-appconfig/src/AppConfigClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -269,11 +269,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-appconfig/src/runtimeConfig.browser.ts b/clients/client-appconfig/src/runtimeConfig.browser.ts index 481f0f2869e3..9332910ed557 100644 --- a/clients/client-appconfig/src/runtimeConfig.browser.ts +++ b/clients/client-appconfig/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AppConfigClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-appconfig/src/runtimeConfig.ts b/clients/client-appconfig/src/runtimeConfig.ts index f3734c6eef20..54c73f37311b 100644 --- a/clients/client-appconfig/src/runtimeConfig.ts +++ b/clients/client-appconfig/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AppConfigClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-appconfigdata/package.json b/clients/client-appconfigdata/package.json index 51415c0b4f83..6a430ce1994d 100644 --- a/clients/client-appconfigdata/package.json +++ b/clients/client-appconfigdata/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-appconfigdata/src/AppConfigDataClient.ts b/clients/client-appconfigdata/src/AppConfigDataClient.ts index 7597eb2aae54..5ce9b2e7087b 100644 --- a/clients/client-appconfigdata/src/AppConfigDataClient.ts +++ b/clients/client-appconfigdata/src/AppConfigDataClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -85,11 +85,11 @@ export type ServiceOutputTypes = GetLatestConfigurationCommandOutput | StartConf /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-appconfigdata/src/runtimeConfig.browser.ts b/clients/client-appconfigdata/src/runtimeConfig.browser.ts index 364813490d1d..281ecb7e00ae 100644 --- a/clients/client-appconfigdata/src/runtimeConfig.browser.ts +++ b/clients/client-appconfigdata/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AppConfigDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-appconfigdata/src/runtimeConfig.ts b/clients/client-appconfigdata/src/runtimeConfig.ts index c2cf96e48af3..eaad8a0f14fe 100644 --- a/clients/client-appconfigdata/src/runtimeConfig.ts +++ b/clients/client-appconfigdata/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AppConfigDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-appfabric/package.json b/clients/client-appfabric/package.json index 49352c2fab1d..ba6bdddc46c2 100644 --- a/clients/client-appfabric/package.json +++ b/clients/client-appfabric/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-appfabric/src/AppFabricClient.ts b/clients/client-appfabric/src/AppFabricClient.ts index d5d2f181e385..6f273f7bee54 100644 --- a/clients/client-appfabric/src/AppFabricClient.ts +++ b/clients/client-appfabric/src/AppFabricClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -197,11 +197,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-appfabric/src/runtimeConfig.browser.ts b/clients/client-appfabric/src/runtimeConfig.browser.ts index 6112c214880e..5de60e3e1083 100644 --- a/clients/client-appfabric/src/runtimeConfig.browser.ts +++ b/clients/client-appfabric/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AppFabricClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-appfabric/src/runtimeConfig.ts b/clients/client-appfabric/src/runtimeConfig.ts index e32d1c3a6181..618e1b00a124 100644 --- a/clients/client-appfabric/src/runtimeConfig.ts +++ b/clients/client-appfabric/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AppFabricClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-appflow/package.json b/clients/client-appflow/package.json index 2a48877c5db5..6e5b13f67d12 100644 --- a/clients/client-appflow/package.json +++ b/clients/client-appflow/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-appflow/src/AppflowClient.ts b/clients/client-appflow/src/AppflowClient.ts index 06335d3bf1f4..55473e463926 100644 --- a/clients/client-appflow/src/AppflowClient.ts +++ b/clients/client-appflow/src/AppflowClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -188,11 +188,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-appflow/src/runtimeConfig.browser.ts b/clients/client-appflow/src/runtimeConfig.browser.ts index c067d331c71c..e345e23d6fcd 100644 --- a/clients/client-appflow/src/runtimeConfig.browser.ts +++ b/clients/client-appflow/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AppflowClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-appflow/src/runtimeConfig.ts b/clients/client-appflow/src/runtimeConfig.ts index 3fb0f2c2c294..8bc65cb933bf 100644 --- a/clients/client-appflow/src/runtimeConfig.ts +++ b/clients/client-appflow/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AppflowClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-appintegrations/package.json b/clients/client-appintegrations/package.json index 5ccc0dd0c88c..9cec7b0e9303 100644 --- a/clients/client-appintegrations/package.json +++ b/clients/client-appintegrations/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-appintegrations/src/AppIntegrationsClient.ts b/clients/client-appintegrations/src/AppIntegrationsClient.ts index f87e3ddedfac..64bb2a0b2a59 100644 --- a/clients/client-appintegrations/src/AppIntegrationsClient.ts +++ b/clients/client-appintegrations/src/AppIntegrationsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -179,11 +179,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-appintegrations/src/runtimeConfig.browser.ts b/clients/client-appintegrations/src/runtimeConfig.browser.ts index 0dc91c6343fd..074853b6b005 100644 --- a/clients/client-appintegrations/src/runtimeConfig.browser.ts +++ b/clients/client-appintegrations/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AppIntegrationsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-appintegrations/src/runtimeConfig.ts b/clients/client-appintegrations/src/runtimeConfig.ts index f5cc46f48c22..cc96f10284e5 100644 --- a/clients/client-appintegrations/src/runtimeConfig.ts +++ b/clients/client-appintegrations/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AppIntegrationsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-application-auto-scaling/package.json b/clients/client-application-auto-scaling/package.json index 0038a1a990c3..e74793e44fa0 100644 --- a/clients/client-application-auto-scaling/package.json +++ b/clients/client-application-auto-scaling/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts b/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts index 0a60f5bafdc0..856ff162f6b0 100644 --- a/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts +++ b/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -143,11 +143,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-application-auto-scaling/src/runtimeConfig.browser.ts b/clients/client-application-auto-scaling/src/runtimeConfig.browser.ts index f52a08d8ada5..1a333305a059 100644 --- a/clients/client-application-auto-scaling/src/runtimeConfig.browser.ts +++ b/clients/client-application-auto-scaling/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ApplicationAutoScalingClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-application-auto-scaling/src/runtimeConfig.ts b/clients/client-application-auto-scaling/src/runtimeConfig.ts index 645b4f69bd5d..91a866c8a7ef 100644 --- a/clients/client-application-auto-scaling/src/runtimeConfig.ts +++ b/clients/client-application-auto-scaling/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ApplicationAutoScalingClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-application-discovery-service/package.json b/clients/client-application-discovery-service/package.json index b605a23755a4..cd9dfb4b8473 100644 --- a/clients/client-application-discovery-service/package.json +++ b/clients/client-application-discovery-service/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-application-discovery-service/src/ApplicationDiscoveryServiceClient.ts b/clients/client-application-discovery-service/src/ApplicationDiscoveryServiceClient.ts index 812d49171998..c140566406d5 100644 --- a/clients/client-application-discovery-service/src/ApplicationDiscoveryServiceClient.ts +++ b/clients/client-application-discovery-service/src/ApplicationDiscoveryServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -212,11 +212,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-application-discovery-service/src/runtimeConfig.browser.ts b/clients/client-application-discovery-service/src/runtimeConfig.browser.ts index dcf9e6a21828..bb70061e405d 100644 --- a/clients/client-application-discovery-service/src/runtimeConfig.browser.ts +++ b/clients/client-application-discovery-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ApplicationDiscoveryServiceClientConfig defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-application-discovery-service/src/runtimeConfig.ts b/clients/client-application-discovery-service/src/runtimeConfig.ts index cae862d6d384..80bd5404fbcb 100644 --- a/clients/client-application-discovery-service/src/runtimeConfig.ts +++ b/clients/client-application-discovery-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ApplicationDiscoveryServiceClientConfig defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-application-insights/package.json b/clients/client-application-insights/package.json index 3f938b094d57..167212d8a93a 100644 --- a/clients/client-application-insights/package.json +++ b/clients/client-application-insights/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-application-insights/src/ApplicationInsightsClient.ts b/clients/client-application-insights/src/ApplicationInsightsClient.ts index 79eea4172cc3..9d6c4982cad4 100644 --- a/clients/client-application-insights/src/ApplicationInsightsClient.ts +++ b/clients/client-application-insights/src/ApplicationInsightsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -200,11 +200,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-application-insights/src/runtimeConfig.browser.ts b/clients/client-application-insights/src/runtimeConfig.browser.ts index 0aaa864e539d..0202fa041e87 100644 --- a/clients/client-application-insights/src/runtimeConfig.browser.ts +++ b/clients/client-application-insights/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ApplicationInsightsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-application-insights/src/runtimeConfig.ts b/clients/client-application-insights/src/runtimeConfig.ts index 9e3a9f7ec427..f2bb28bc3e32 100644 --- a/clients/client-application-insights/src/runtimeConfig.ts +++ b/clients/client-application-insights/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ApplicationInsightsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-applicationcostprofiler/package.json b/clients/client-applicationcostprofiler/package.json index 5edcd18a9626..c4f9477b9f1b 100644 --- a/clients/client-applicationcostprofiler/package.json +++ b/clients/client-applicationcostprofiler/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-applicationcostprofiler/src/ApplicationCostProfilerClient.ts b/clients/client-applicationcostprofiler/src/ApplicationCostProfilerClient.ts index 1004dfffb8d1..cd368d8a0e87 100644 --- a/clients/client-applicationcostprofiler/src/ApplicationCostProfilerClient.ts +++ b/clients/client-applicationcostprofiler/src/ApplicationCostProfilerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -113,11 +113,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-applicationcostprofiler/src/runtimeConfig.browser.ts b/clients/client-applicationcostprofiler/src/runtimeConfig.browser.ts index 72dd12477e65..f66204d6ab67 100644 --- a/clients/client-applicationcostprofiler/src/runtimeConfig.browser.ts +++ b/clients/client-applicationcostprofiler/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ApplicationCostProfilerClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-applicationcostprofiler/src/runtimeConfig.ts b/clients/client-applicationcostprofiler/src/runtimeConfig.ts index 8f8897a5c351..8a4fccd03640 100644 --- a/clients/client-applicationcostprofiler/src/runtimeConfig.ts +++ b/clients/client-applicationcostprofiler/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ApplicationCostProfilerClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-apprunner/package.json b/clients/client-apprunner/package.json index 229b87e71251..5c2a74c37065 100644 --- a/clients/client-apprunner/package.json +++ b/clients/client-apprunner/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-apprunner/src/AppRunnerClient.ts b/clients/client-apprunner/src/AppRunnerClient.ts index 89da3624b8ad..424259f0cd6d 100644 --- a/clients/client-apprunner/src/AppRunnerClient.ts +++ b/clients/client-apprunner/src/AppRunnerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -248,11 +248,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-apprunner/src/runtimeConfig.browser.ts b/clients/client-apprunner/src/runtimeConfig.browser.ts index 7d86c371e839..29de0ca1aada 100644 --- a/clients/client-apprunner/src/runtimeConfig.browser.ts +++ b/clients/client-apprunner/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AppRunnerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-apprunner/src/runtimeConfig.ts b/clients/client-apprunner/src/runtimeConfig.ts index be5741192b47..fb326323817b 100644 --- a/clients/client-apprunner/src/runtimeConfig.ts +++ b/clients/client-apprunner/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AppRunnerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-appstream/package.json b/clients/client-appstream/package.json index 297da5c554b7..2a5876347fee 100644 --- a/clients/client-appstream/package.json +++ b/clients/client-appstream/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-appstream/src/AppStreamClient.ts b/clients/client-appstream/src/AppStreamClient.ts index f5dbf31012f4..f2b19fb3f261 100644 --- a/clients/client-appstream/src/AppStreamClient.ts +++ b/clients/client-appstream/src/AppStreamClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -410,11 +410,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-appstream/src/runtimeConfig.browser.ts b/clients/client-appstream/src/runtimeConfig.browser.ts index 1ec81d0ace39..133c309542df 100644 --- a/clients/client-appstream/src/runtimeConfig.browser.ts +++ b/clients/client-appstream/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AppStreamClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-appstream/src/runtimeConfig.ts b/clients/client-appstream/src/runtimeConfig.ts index 4f65ce6eca45..c1725a9bb3cf 100644 --- a/clients/client-appstream/src/runtimeConfig.ts +++ b/clients/client-appstream/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AppStreamClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-appsync/package.json b/clients/client-appsync/package.json index 63a5e10da61b..3cc571c6f96c 100644 --- a/clients/client-appsync/package.json +++ b/clients/client-appsync/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-appsync/src/AppSyncClient.ts b/clients/client-appsync/src/AppSyncClient.ts index dfa72bd40d9f..e0379426ed9c 100644 --- a/clients/client-appsync/src/AppSyncClient.ts +++ b/clients/client-appsync/src/AppSyncClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -323,11 +323,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-appsync/src/runtimeConfig.browser.ts b/clients/client-appsync/src/runtimeConfig.browser.ts index 040e916e1df8..966259bddedc 100644 --- a/clients/client-appsync/src/runtimeConfig.browser.ts +++ b/clients/client-appsync/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AppSyncClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-appsync/src/runtimeConfig.ts b/clients/client-appsync/src/runtimeConfig.ts index aae4a28419a2..aaa3c66fbd3e 100644 --- a/clients/client-appsync/src/runtimeConfig.ts +++ b/clients/client-appsync/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AppSyncClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-arc-zonal-shift/package.json b/clients/client-arc-zonal-shift/package.json index c49748427010..8184f46f3d25 100644 --- a/clients/client-arc-zonal-shift/package.json +++ b/clients/client-arc-zonal-shift/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-arc-zonal-shift/src/ARCZonalShiftClient.ts b/clients/client-arc-zonal-shift/src/ARCZonalShiftClient.ts index 8c78288b92be..a310b53f25c2 100644 --- a/clients/client-arc-zonal-shift/src/ARCZonalShiftClient.ts +++ b/clients/client-arc-zonal-shift/src/ARCZonalShiftClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -125,11 +125,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-arc-zonal-shift/src/runtimeConfig.browser.ts b/clients/client-arc-zonal-shift/src/runtimeConfig.browser.ts index a034eb1a8b52..993c29644349 100644 --- a/clients/client-arc-zonal-shift/src/runtimeConfig.browser.ts +++ b/clients/client-arc-zonal-shift/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ARCZonalShiftClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-arc-zonal-shift/src/runtimeConfig.ts b/clients/client-arc-zonal-shift/src/runtimeConfig.ts index 51a79d10bd9f..48d440d11bad 100644 --- a/clients/client-arc-zonal-shift/src/runtimeConfig.ts +++ b/clients/client-arc-zonal-shift/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ARCZonalShiftClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-artifact/package.json b/clients/client-artifact/package.json index 75cd7a06260a..f83aac26f484 100644 --- a/clients/client-artifact/package.json +++ b/clients/client-artifact/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-artifact/src/ArtifactClient.ts b/clients/client-artifact/src/ArtifactClient.ts index 4fb8cac3b16a..1e676aaf8c77 100644 --- a/clients/client-artifact/src/ArtifactClient.ts +++ b/clients/client-artifact/src/ArtifactClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -95,11 +95,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-artifact/src/runtimeConfig.browser.ts b/clients/client-artifact/src/runtimeConfig.browser.ts index 815c514c893f..63649c715b4b 100644 --- a/clients/client-artifact/src/runtimeConfig.browser.ts +++ b/clients/client-artifact/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ArtifactClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-artifact/src/runtimeConfig.ts b/clients/client-artifact/src/runtimeConfig.ts index 8e2a43059474..b126f4211f94 100644 --- a/clients/client-artifact/src/runtimeConfig.ts +++ b/clients/client-artifact/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ArtifactClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-athena/package.json b/clients/client-athena/package.json index 55e4625dbf81..27fa0260607d 100644 --- a/clients/client-athena/package.json +++ b/clients/client-athena/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-athena/src/AthenaClient.ts b/clients/client-athena/src/AthenaClient.ts index 490f77d3e489..0cd4984c3aa5 100644 --- a/clients/client-athena/src/AthenaClient.ts +++ b/clients/client-athena/src/AthenaClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -374,11 +374,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-athena/src/runtimeConfig.browser.ts b/clients/client-athena/src/runtimeConfig.browser.ts index a5be09a11b4e..52e7c0240e13 100644 --- a/clients/client-athena/src/runtimeConfig.browser.ts +++ b/clients/client-athena/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AthenaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-athena/src/runtimeConfig.ts b/clients/client-athena/src/runtimeConfig.ts index 9a81ca07a8a0..80c00ba3910f 100644 --- a/clients/client-athena/src/runtimeConfig.ts +++ b/clients/client-athena/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AthenaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-auditmanager/package.json b/clients/client-auditmanager/package.json index cb171e7f2871..829688806181 100644 --- a/clients/client-auditmanager/package.json +++ b/clients/client-auditmanager/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-auditmanager/src/AuditManagerClient.ts b/clients/client-auditmanager/src/AuditManagerClient.ts index b0bb16178a32..a1e8da1cd63e 100644 --- a/clients/client-auditmanager/src/AuditManagerClient.ts +++ b/clients/client-auditmanager/src/AuditManagerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -377,11 +377,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-auditmanager/src/runtimeConfig.browser.ts b/clients/client-auditmanager/src/runtimeConfig.browser.ts index a08f9049c4fb..9e913d07ae9d 100644 --- a/clients/client-auditmanager/src/runtimeConfig.browser.ts +++ b/clients/client-auditmanager/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AuditManagerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-auditmanager/src/runtimeConfig.ts b/clients/client-auditmanager/src/runtimeConfig.ts index b832f3496533..1867414d95e9 100644 --- a/clients/client-auditmanager/src/runtimeConfig.ts +++ b/clients/client-auditmanager/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AuditManagerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-auto-scaling-plans/package.json b/clients/client-auto-scaling-plans/package.json index af503d656802..81a9b910f07f 100644 --- a/clients/client-auto-scaling-plans/package.json +++ b/clients/client-auto-scaling-plans/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-auto-scaling-plans/src/AutoScalingPlansClient.ts b/clients/client-auto-scaling-plans/src/AutoScalingPlansClient.ts index 0762281178fb..adb93f9e134a 100644 --- a/clients/client-auto-scaling-plans/src/AutoScalingPlansClient.ts +++ b/clients/client-auto-scaling-plans/src/AutoScalingPlansClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -104,11 +104,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-auto-scaling-plans/src/runtimeConfig.browser.ts b/clients/client-auto-scaling-plans/src/runtimeConfig.browser.ts index 0cd0a3a66bc0..a286a7de6c2f 100644 --- a/clients/client-auto-scaling-plans/src/runtimeConfig.browser.ts +++ b/clients/client-auto-scaling-plans/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AutoScalingPlansClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-auto-scaling-plans/src/runtimeConfig.ts b/clients/client-auto-scaling-plans/src/runtimeConfig.ts index 9bac8225779f..f397cf24e372 100644 --- a/clients/client-auto-scaling-plans/src/runtimeConfig.ts +++ b/clients/client-auto-scaling-plans/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AutoScalingPlansClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-auto-scaling/package.json b/clients/client-auto-scaling/package.json index 986f497c7dcb..7a00db0af488 100644 --- a/clients/client-auto-scaling/package.json +++ b/clients/client-auto-scaling/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-auto-scaling/src/AutoScalingClient.ts b/clients/client-auto-scaling/src/AutoScalingClient.ts index c2e30f7507f2..5213f6005381 100644 --- a/clients/client-auto-scaling/src/AutoScalingClient.ts +++ b/clients/client-auto-scaling/src/AutoScalingClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -410,11 +410,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-auto-scaling/src/runtimeConfig.browser.ts b/clients/client-auto-scaling/src/runtimeConfig.browser.ts index 61f7d7d6f147..fc0c2f798fa5 100644 --- a/clients/client-auto-scaling/src/runtimeConfig.browser.ts +++ b/clients/client-auto-scaling/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: AutoScalingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-auto-scaling/src/runtimeConfig.ts b/clients/client-auto-scaling/src/runtimeConfig.ts index 8f4d700a8aff..be0152f5cd27 100644 --- a/clients/client-auto-scaling/src/runtimeConfig.ts +++ b/clients/client-auto-scaling/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: AutoScalingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-b2bi/package.json b/clients/client-b2bi/package.json index 63c5df50309e..170d111ef3e0 100644 --- a/clients/client-b2bi/package.json +++ b/clients/client-b2bi/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-b2bi/src/B2biClient.ts b/clients/client-b2bi/src/B2biClient.ts index 3f28e1e67996..7ed6464c94de 100644 --- a/clients/client-b2bi/src/B2biClient.ts +++ b/clients/client-b2bi/src/B2biClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -164,11 +164,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-b2bi/src/runtimeConfig.browser.ts b/clients/client-b2bi/src/runtimeConfig.browser.ts index 4d85ffb567cb..ff4179b24d41 100644 --- a/clients/client-b2bi/src/runtimeConfig.browser.ts +++ b/clients/client-b2bi/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: B2biClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-b2bi/src/runtimeConfig.ts b/clients/client-b2bi/src/runtimeConfig.ts index fa6447a14acf..f6c79cdde4f3 100644 --- a/clients/client-b2bi/src/runtimeConfig.ts +++ b/clients/client-b2bi/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: B2biClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-backup-gateway/package.json b/clients/client-backup-gateway/package.json index 792a76077cc2..c5401287fd30 100644 --- a/clients/client-backup-gateway/package.json +++ b/clients/client-backup-gateway/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-backup-gateway/src/BackupGatewayClient.ts b/clients/client-backup-gateway/src/BackupGatewayClient.ts index 14df82e10038..00a642c4dea5 100644 --- a/clients/client-backup-gateway/src/BackupGatewayClient.ts +++ b/clients/client-backup-gateway/src/BackupGatewayClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -194,11 +194,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-backup-gateway/src/runtimeConfig.browser.ts b/clients/client-backup-gateway/src/runtimeConfig.browser.ts index 17fe5d425dee..e49b3712a2a9 100644 --- a/clients/client-backup-gateway/src/runtimeConfig.browser.ts +++ b/clients/client-backup-gateway/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BackupGatewayClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-backup-gateway/src/runtimeConfig.ts b/clients/client-backup-gateway/src/runtimeConfig.ts index 2f8965640221..f49ae84f0749 100644 --- a/clients/client-backup-gateway/src/runtimeConfig.ts +++ b/clients/client-backup-gateway/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BackupGatewayClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-backup/package.json b/clients/client-backup/package.json index 03e454d1baa2..15c77e13b37f 100644 --- a/clients/client-backup/package.json +++ b/clients/client-backup/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-backup/src/BackupClient.ts b/clients/client-backup/src/BackupClient.ts index 477e55b9d11f..d6276bdcc9db 100644 --- a/clients/client-backup/src/BackupClient.ts +++ b/clients/client-backup/src/BackupClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -506,11 +506,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-backup/src/runtimeConfig.browser.ts b/clients/client-backup/src/runtimeConfig.browser.ts index c73d3f8c33ee..5a0ea79a096a 100644 --- a/clients/client-backup/src/runtimeConfig.browser.ts +++ b/clients/client-backup/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BackupClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-backup/src/runtimeConfig.ts b/clients/client-backup/src/runtimeConfig.ts index 5e96cbe0ad3e..0230a9e89a5e 100644 --- a/clients/client-backup/src/runtimeConfig.ts +++ b/clients/client-backup/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BackupClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-backupstorage/package.json b/clients/client-backupstorage/package.json index 694ea1631d7b..9990adfbbdad 100644 --- a/clients/client-backupstorage/package.json +++ b/clients/client-backupstorage/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-backupstorage/src/BackupStorageClient.ts b/clients/client-backupstorage/src/BackupStorageClient.ts index 58d6dd5e9d96..3fb1603ff222 100644 --- a/clients/client-backupstorage/src/BackupStorageClient.ts +++ b/clients/client-backupstorage/src/BackupStorageClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -108,11 +108,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-backupstorage/src/runtimeConfig.browser.ts b/clients/client-backupstorage/src/runtimeConfig.browser.ts index 60d805897324..a65d3434e579 100644 --- a/clients/client-backupstorage/src/runtimeConfig.browser.ts +++ b/clients/client-backupstorage/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BackupStorageClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-backupstorage/src/runtimeConfig.ts b/clients/client-backupstorage/src/runtimeConfig.ts index d8005153b3f6..63c1317cac53 100644 --- a/clients/client-backupstorage/src/runtimeConfig.ts +++ b/clients/client-backupstorage/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BackupStorageClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-batch/package.json b/clients/client-batch/package.json index 3b49fc374767..589e8f13d230 100644 --- a/clients/client-batch/package.json +++ b/clients/client-batch/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-batch/src/BatchClient.ts b/clients/client-batch/src/BatchClient.ts index 65aadf31218a..8b9058c5370d 100644 --- a/clients/client-batch/src/BatchClient.ts +++ b/clients/client-batch/src/BatchClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -188,11 +188,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-batch/src/runtimeConfig.browser.ts b/clients/client-batch/src/runtimeConfig.browser.ts index f0651468f27b..8eafe56ea60f 100644 --- a/clients/client-batch/src/runtimeConfig.browser.ts +++ b/clients/client-batch/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BatchClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-batch/src/runtimeConfig.ts b/clients/client-batch/src/runtimeConfig.ts index 7784ea266152..28d60c0b7a96 100644 --- a/clients/client-batch/src/runtimeConfig.ts +++ b/clients/client-batch/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BatchClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-bcm-data-exports/package.json b/clients/client-bcm-data-exports/package.json index ea78cbbf909f..bb2cfaecc299 100644 --- a/clients/client-bcm-data-exports/package.json +++ b/clients/client-bcm-data-exports/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-bcm-data-exports/src/BCMDataExportsClient.ts b/clients/client-bcm-data-exports/src/BCMDataExportsClient.ts index b83c3c3d5f6e..64eb6cbe7439 100644 --- a/clients/client-bcm-data-exports/src/BCMDataExportsClient.ts +++ b/clients/client-bcm-data-exports/src/BCMDataExportsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -116,11 +116,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-bcm-data-exports/src/runtimeConfig.browser.ts b/clients/client-bcm-data-exports/src/runtimeConfig.browser.ts index 5ed8102dec34..353a3ab621cf 100644 --- a/clients/client-bcm-data-exports/src/runtimeConfig.browser.ts +++ b/clients/client-bcm-data-exports/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BCMDataExportsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-bcm-data-exports/src/runtimeConfig.ts b/clients/client-bcm-data-exports/src/runtimeConfig.ts index ebe6d603aa84..3cf40ebc279a 100644 --- a/clients/client-bcm-data-exports/src/runtimeConfig.ts +++ b/clients/client-bcm-data-exports/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BCMDataExportsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-bedrock-agent-runtime/package.json b/clients/client-bedrock-agent-runtime/package.json index cb03742b9c6a..37f9551ce832 100644 --- a/clients/client-bedrock-agent-runtime/package.json +++ b/clients/client-bedrock-agent-runtime/package.json @@ -32,33 +32,33 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-bedrock-agent-runtime/src/BedrockAgentRuntimeClient.ts b/clients/client-bedrock-agent-runtime/src/BedrockAgentRuntimeClient.ts index b168d08ae1ba..1054fb5a732b 100644 --- a/clients/client-bedrock-agent-runtime/src/BedrockAgentRuntimeClient.ts +++ b/clients/client-bedrock-agent-runtime/src/BedrockAgentRuntimeClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -89,11 +89,11 @@ export type ServiceOutputTypes = InvokeAgentCommandOutput | RetrieveAndGenerateC /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-bedrock-agent-runtime/src/runtimeConfig.browser.ts b/clients/client-bedrock-agent-runtime/src/runtimeConfig.browser.ts index 22627768d256..4ea4031a8f74 100644 --- a/clients/client-bedrock-agent-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-bedrock-agent-runtime/src/runtimeConfig.browser.ts @@ -36,7 +36,7 @@ export const getRuntimeConfig = (config: BedrockAgentRuntimeClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-bedrock-agent-runtime/src/runtimeConfig.ts b/clients/client-bedrock-agent-runtime/src/runtimeConfig.ts index af13d4dab869..88e67addc249 100644 --- a/clients/client-bedrock-agent-runtime/src/runtimeConfig.ts +++ b/clients/client-bedrock-agent-runtime/src/runtimeConfig.ts @@ -46,7 +46,7 @@ export const getRuntimeConfig = (config: BedrockAgentRuntimeClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-bedrock-agent/package.json b/clients/client-bedrock-agent/package.json index 935bab957f4f..a351422506c5 100644 --- a/clients/client-bedrock-agent/package.json +++ b/clients/client-bedrock-agent/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-bedrock-agent/src/BedrockAgentClient.ts b/clients/client-bedrock-agent/src/BedrockAgentClient.ts index 122ddd8abeb2..9e0a296eae26 100644 --- a/clients/client-bedrock-agent/src/BedrockAgentClient.ts +++ b/clients/client-bedrock-agent/src/BedrockAgentClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -239,11 +239,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-bedrock-agent/src/runtimeConfig.browser.ts b/clients/client-bedrock-agent/src/runtimeConfig.browser.ts index d712881a345e..ab0b8598cbdc 100644 --- a/clients/client-bedrock-agent/src/runtimeConfig.browser.ts +++ b/clients/client-bedrock-agent/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BedrockAgentClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-bedrock-agent/src/runtimeConfig.ts b/clients/client-bedrock-agent/src/runtimeConfig.ts index 39de78605579..a005ae3f805d 100644 --- a/clients/client-bedrock-agent/src/runtimeConfig.ts +++ b/clients/client-bedrock-agent/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BedrockAgentClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-bedrock-runtime/package.json b/clients/client-bedrock-runtime/package.json index a9f4c6a7df66..2ec5777da2fb 100644 --- a/clients/client-bedrock-runtime/package.json +++ b/clients/client-bedrock-runtime/package.json @@ -32,34 +32,34 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-bedrock-runtime/src/BedrockRuntimeClient.ts b/clients/client-bedrock-runtime/src/BedrockRuntimeClient.ts index 8eabe0ee9498..1998cd9a52e1 100644 --- a/clients/client-bedrock-runtime/src/BedrockRuntimeClient.ts +++ b/clients/client-bedrock-runtime/src/BedrockRuntimeClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -88,11 +88,11 @@ export type ServiceOutputTypes = InvokeModelCommandOutput | InvokeModelWithRespo /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-bedrock-runtime/src/runtimeConfig.browser.ts b/clients/client-bedrock-runtime/src/runtimeConfig.browser.ts index daff8b525fe1..10e12588c948 100644 --- a/clients/client-bedrock-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-bedrock-runtime/src/runtimeConfig.browser.ts @@ -36,7 +36,7 @@ export const getRuntimeConfig = (config: BedrockRuntimeClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-bedrock-runtime/src/runtimeConfig.ts b/clients/client-bedrock-runtime/src/runtimeConfig.ts index 92045f3cde12..39fbee288466 100644 --- a/clients/client-bedrock-runtime/src/runtimeConfig.ts +++ b/clients/client-bedrock-runtime/src/runtimeConfig.ts @@ -46,7 +46,7 @@ export const getRuntimeConfig = (config: BedrockRuntimeClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-bedrock/package.json b/clients/client-bedrock/package.json index b36c15f235ff..4edf2999182c 100644 --- a/clients/client-bedrock/package.json +++ b/clients/client-bedrock/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-bedrock/src/BedrockClient.ts b/clients/client-bedrock/src/BedrockClient.ts index b45a7ae4c439..9222d1078b2c 100644 --- a/clients/client-bedrock/src/BedrockClient.ts +++ b/clients/client-bedrock/src/BedrockClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -179,11 +179,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-bedrock/src/runtimeConfig.browser.ts b/clients/client-bedrock/src/runtimeConfig.browser.ts index f99e603b1840..26f26fe25d1d 100644 --- a/clients/client-bedrock/src/runtimeConfig.browser.ts +++ b/clients/client-bedrock/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BedrockClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-bedrock/src/runtimeConfig.ts b/clients/client-bedrock/src/runtimeConfig.ts index dc3f612dba32..aa2fc04e1138 100644 --- a/clients/client-bedrock/src/runtimeConfig.ts +++ b/clients/client-bedrock/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BedrockClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-billingconductor/package.json b/clients/client-billingconductor/package.json index c10c5c371553..42bdf5b4da13 100644 --- a/clients/client-billingconductor/package.json +++ b/clients/client-billingconductor/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-billingconductor/src/BillingconductorClient.ts b/clients/client-billingconductor/src/BillingconductorClient.ts index a60579cfe38e..5e8aec4bc768 100644 --- a/clients/client-billingconductor/src/BillingconductorClient.ts +++ b/clients/client-billingconductor/src/BillingconductorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -224,11 +224,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-billingconductor/src/runtimeConfig.browser.ts b/clients/client-billingconductor/src/runtimeConfig.browser.ts index 1f4705f9a008..cfe2fd00cb17 100644 --- a/clients/client-billingconductor/src/runtimeConfig.browser.ts +++ b/clients/client-billingconductor/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BillingconductorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-billingconductor/src/runtimeConfig.ts b/clients/client-billingconductor/src/runtimeConfig.ts index 77fb92184342..8e57673fd7b6 100644 --- a/clients/client-billingconductor/src/runtimeConfig.ts +++ b/clients/client-billingconductor/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BillingconductorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-braket/package.json b/clients/client-braket/package.json index 04e32f9f3a22..3871712c2a0e 100644 --- a/clients/client-braket/package.json +++ b/clients/client-braket/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-braket/src/BraketClient.ts b/clients/client-braket/src/BraketClient.ts index 67a9f7f3f359..199cae753d3e 100644 --- a/clients/client-braket/src/BraketClient.ts +++ b/clients/client-braket/src/BraketClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -119,11 +119,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-braket/src/runtimeConfig.browser.ts b/clients/client-braket/src/runtimeConfig.browser.ts index 2c5e6f647623..85cff862ebf8 100644 --- a/clients/client-braket/src/runtimeConfig.browser.ts +++ b/clients/client-braket/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BraketClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-braket/src/runtimeConfig.ts b/clients/client-braket/src/runtimeConfig.ts index d33921f2170b..c0da0c204fb4 100644 --- a/clients/client-braket/src/runtimeConfig.ts +++ b/clients/client-braket/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BraketClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-budgets/package.json b/clients/client-budgets/package.json index 4f9a8873dd55..804ab33eecd4 100644 --- a/clients/client-budgets/package.json +++ b/clients/client-budgets/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-budgets/src/BudgetsClient.ts b/clients/client-budgets/src/BudgetsClient.ts index f80af7e4c5cc..f5830a7a5f89 100644 --- a/clients/client-budgets/src/BudgetsClient.ts +++ b/clients/client-budgets/src/BudgetsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -173,11 +173,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-budgets/src/runtimeConfig.browser.ts b/clients/client-budgets/src/runtimeConfig.browser.ts index 0a35ed148e1a..5982ee05fca8 100644 --- a/clients/client-budgets/src/runtimeConfig.browser.ts +++ b/clients/client-budgets/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: BudgetsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-budgets/src/runtimeConfig.ts b/clients/client-budgets/src/runtimeConfig.ts index 7a38a2cf30ba..83adaa8edf51 100644 --- a/clients/client-budgets/src/runtimeConfig.ts +++ b/clients/client-budgets/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: BudgetsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-chatbot/package.json b/clients/client-chatbot/package.json index 3c272d90f341..75653fb595ff 100644 --- a/clients/client-chatbot/package.json +++ b/clients/client-chatbot/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-chatbot/src/ChatbotClient.ts b/clients/client-chatbot/src/ChatbotClient.ts index 47a003617541..feaf118133d9 100644 --- a/clients/client-chatbot/src/ChatbotClient.ts +++ b/clients/client-chatbot/src/ChatbotClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -215,11 +215,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-chatbot/src/runtimeConfig.browser.ts b/clients/client-chatbot/src/runtimeConfig.browser.ts index c04201a25c31..1b08993aed01 100644 --- a/clients/client-chatbot/src/runtimeConfig.browser.ts +++ b/clients/client-chatbot/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ChatbotClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-chatbot/src/runtimeConfig.ts b/clients/client-chatbot/src/runtimeConfig.ts index 3d33f5b8e56b..f6737853a3b8 100644 --- a/clients/client-chatbot/src/runtimeConfig.ts +++ b/clients/client-chatbot/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ChatbotClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-chime-sdk-identity/package.json b/clients/client-chime-sdk-identity/package.json index 52b3becdbbd3..e10ff6f03d4f 100644 --- a/clients/client-chime-sdk-identity/package.json +++ b/clients/client-chime-sdk-identity/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-chime-sdk-identity/src/ChimeSDKIdentityClient.ts b/clients/client-chime-sdk-identity/src/ChimeSDKIdentityClient.ts index 1a5e1e266759..ca90c3d25c5b 100644 --- a/clients/client-chime-sdk-identity/src/ChimeSDKIdentityClient.ts +++ b/clients/client-chime-sdk-identity/src/ChimeSDKIdentityClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -239,11 +239,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-chime-sdk-identity/src/runtimeConfig.browser.ts b/clients/client-chime-sdk-identity/src/runtimeConfig.browser.ts index 5f2f88b2214c..15548367ae76 100644 --- a/clients/client-chime-sdk-identity/src/runtimeConfig.browser.ts +++ b/clients/client-chime-sdk-identity/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ChimeSDKIdentityClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-chime-sdk-identity/src/runtimeConfig.ts b/clients/client-chime-sdk-identity/src/runtimeConfig.ts index 9cb9370a7a4d..956655427578 100644 --- a/clients/client-chime-sdk-identity/src/runtimeConfig.ts +++ b/clients/client-chime-sdk-identity/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ChimeSDKIdentityClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-chime-sdk-media-pipelines/package.json b/clients/client-chime-sdk-media-pipelines/package.json index a465bd564f25..7f242d1b6da0 100644 --- a/clients/client-chime-sdk-media-pipelines/package.json +++ b/clients/client-chime-sdk-media-pipelines/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-chime-sdk-media-pipelines/src/ChimeSDKMediaPipelinesClient.ts b/clients/client-chime-sdk-media-pipelines/src/ChimeSDKMediaPipelinesClient.ts index 59a8836d413b..b557d04dddb1 100644 --- a/clients/client-chime-sdk-media-pipelines/src/ChimeSDKMediaPipelinesClient.ts +++ b/clients/client-chime-sdk-media-pipelines/src/ChimeSDKMediaPipelinesClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -251,11 +251,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-chime-sdk-media-pipelines/src/runtimeConfig.browser.ts b/clients/client-chime-sdk-media-pipelines/src/runtimeConfig.browser.ts index 7a9f8452d3a5..c9241d9c1c3a 100644 --- a/clients/client-chime-sdk-media-pipelines/src/runtimeConfig.browser.ts +++ b/clients/client-chime-sdk-media-pipelines/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ChimeSDKMediaPipelinesClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-chime-sdk-media-pipelines/src/runtimeConfig.ts b/clients/client-chime-sdk-media-pipelines/src/runtimeConfig.ts index b54618cea7ca..fe589eafb654 100644 --- a/clients/client-chime-sdk-media-pipelines/src/runtimeConfig.ts +++ b/clients/client-chime-sdk-media-pipelines/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ChimeSDKMediaPipelinesClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-chime-sdk-meetings/package.json b/clients/client-chime-sdk-meetings/package.json index 979d664b24a8..cfb0f8c0e64d 100644 --- a/clients/client-chime-sdk-meetings/package.json +++ b/clients/client-chime-sdk-meetings/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-chime-sdk-meetings/src/ChimeSDKMeetingsClient.ts b/clients/client-chime-sdk-meetings/src/ChimeSDKMeetingsClient.ts index 6ed2cee5d303..6de1d27a03fd 100644 --- a/clients/client-chime-sdk-meetings/src/ChimeSDKMeetingsClient.ts +++ b/clients/client-chime-sdk-meetings/src/ChimeSDKMeetingsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -146,11 +146,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-chime-sdk-meetings/src/runtimeConfig.browser.ts b/clients/client-chime-sdk-meetings/src/runtimeConfig.browser.ts index 2705b0de461a..a8a4bd25274f 100644 --- a/clients/client-chime-sdk-meetings/src/runtimeConfig.browser.ts +++ b/clients/client-chime-sdk-meetings/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ChimeSDKMeetingsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-chime-sdk-meetings/src/runtimeConfig.ts b/clients/client-chime-sdk-meetings/src/runtimeConfig.ts index eb7efcc73a08..197c34876af1 100644 --- a/clients/client-chime-sdk-meetings/src/runtimeConfig.ts +++ b/clients/client-chime-sdk-meetings/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ChimeSDKMeetingsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-chime-sdk-messaging/package.json b/clients/client-chime-sdk-messaging/package.json index 3406d00be936..3608c18566d7 100644 --- a/clients/client-chime-sdk-messaging/package.json +++ b/clients/client-chime-sdk-messaging/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-chime-sdk-messaging/src/ChimeSDKMessagingClient.ts b/clients/client-chime-sdk-messaging/src/ChimeSDKMessagingClient.ts index 9a6896e92fa5..e56a7835481c 100644 --- a/clients/client-chime-sdk-messaging/src/ChimeSDKMessagingClient.ts +++ b/clients/client-chime-sdk-messaging/src/ChimeSDKMessagingClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -326,11 +326,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-chime-sdk-messaging/src/runtimeConfig.browser.ts b/clients/client-chime-sdk-messaging/src/runtimeConfig.browser.ts index b7483c830735..a1114b202310 100644 --- a/clients/client-chime-sdk-messaging/src/runtimeConfig.browser.ts +++ b/clients/client-chime-sdk-messaging/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ChimeSDKMessagingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-chime-sdk-messaging/src/runtimeConfig.ts b/clients/client-chime-sdk-messaging/src/runtimeConfig.ts index 12c6c3d3e78a..dc374f7434f3 100644 --- a/clients/client-chime-sdk-messaging/src/runtimeConfig.ts +++ b/clients/client-chime-sdk-messaging/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ChimeSDKMessagingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-chime-sdk-voice/package.json b/clients/client-chime-sdk-voice/package.json index 84c9bbd1db59..707fbb06b9b2 100644 --- a/clients/client-chime-sdk-voice/package.json +++ b/clients/client-chime-sdk-voice/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-chime-sdk-voice/src/ChimeSDKVoiceClient.ts b/clients/client-chime-sdk-voice/src/ChimeSDKVoiceClient.ts index 136dd8177488..49909e4f0b59 100644 --- a/clients/client-chime-sdk-voice/src/ChimeSDKVoiceClient.ts +++ b/clients/client-chime-sdk-voice/src/ChimeSDKVoiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -563,11 +563,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-chime-sdk-voice/src/runtimeConfig.browser.ts b/clients/client-chime-sdk-voice/src/runtimeConfig.browser.ts index 1d6aa832f4a7..6804e2601556 100644 --- a/clients/client-chime-sdk-voice/src/runtimeConfig.browser.ts +++ b/clients/client-chime-sdk-voice/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ChimeSDKVoiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-chime-sdk-voice/src/runtimeConfig.ts b/clients/client-chime-sdk-voice/src/runtimeConfig.ts index 4186c9c73b03..a6834c7e1bb3 100644 --- a/clients/client-chime-sdk-voice/src/runtimeConfig.ts +++ b/clients/client-chime-sdk-voice/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ChimeSDKVoiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-chime/package.json b/clients/client-chime/package.json index 148c99db7ed6..572ac922807f 100644 --- a/clients/client-chime/package.json +++ b/clients/client-chime/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-chime/src/ChimeClient.ts b/clients/client-chime/src/ChimeClient.ts index bab9faad395e..001b4db123f1 100644 --- a/clients/client-chime/src/ChimeClient.ts +++ b/clients/client-chime/src/ChimeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -995,11 +995,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-chime/src/runtimeConfig.browser.ts b/clients/client-chime/src/runtimeConfig.browser.ts index 6a065922ed0b..c54dfc941a7b 100644 --- a/clients/client-chime/src/runtimeConfig.browser.ts +++ b/clients/client-chime/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ChimeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-chime/src/runtimeConfig.ts b/clients/client-chime/src/runtimeConfig.ts index a1fa6267d1b6..b86f4d1fce7c 100644 --- a/clients/client-chime/src/runtimeConfig.ts +++ b/clients/client-chime/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ChimeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cleanrooms/package.json b/clients/client-cleanrooms/package.json index 7db41fa48eb0..8c0eb7e7edb0 100644 --- a/clients/client-cleanrooms/package.json +++ b/clients/client-cleanrooms/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cleanrooms/src/CleanRoomsClient.ts b/clients/client-cleanrooms/src/CleanRoomsClient.ts index 68466558bc38..020885a5e6bd 100644 --- a/clients/client-cleanrooms/src/CleanRoomsClient.ts +++ b/clients/client-cleanrooms/src/CleanRoomsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -398,11 +398,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cleanrooms/src/runtimeConfig.browser.ts b/clients/client-cleanrooms/src/runtimeConfig.browser.ts index 7e8e07e7bb1e..88f04daa3a7f 100644 --- a/clients/client-cleanrooms/src/runtimeConfig.browser.ts +++ b/clients/client-cleanrooms/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CleanRoomsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cleanrooms/src/runtimeConfig.ts b/clients/client-cleanrooms/src/runtimeConfig.ts index e66392972731..e5b3ac199ab4 100644 --- a/clients/client-cleanrooms/src/runtimeConfig.ts +++ b/clients/client-cleanrooms/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CleanRoomsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cleanroomsml/package.json b/clients/client-cleanroomsml/package.json index d9a7ea504def..b2e66d1b573d 100644 --- a/clients/client-cleanroomsml/package.json +++ b/clients/client-cleanroomsml/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cleanroomsml/src/CleanRoomsMLClient.ts b/clients/client-cleanroomsml/src/CleanRoomsMLClient.ts index e67971beefbc..e902caf6de84 100644 --- a/clients/client-cleanroomsml/src/CleanRoomsMLClient.ts +++ b/clients/client-cleanroomsml/src/CleanRoomsMLClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -212,11 +212,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cleanroomsml/src/runtimeConfig.browser.ts b/clients/client-cleanroomsml/src/runtimeConfig.browser.ts index b118bfacd5a9..812dde2cd104 100644 --- a/clients/client-cleanroomsml/src/runtimeConfig.browser.ts +++ b/clients/client-cleanroomsml/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CleanRoomsMLClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cleanroomsml/src/runtimeConfig.ts b/clients/client-cleanroomsml/src/runtimeConfig.ts index b4daa5de7e8a..ed9f3598abc6 100644 --- a/clients/client-cleanroomsml/src/runtimeConfig.ts +++ b/clients/client-cleanroomsml/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CleanRoomsMLClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloud9/package.json b/clients/client-cloud9/package.json index 1d708dd528a0..d07bb88e9cf9 100644 --- a/clients/client-cloud9/package.json +++ b/clients/client-cloud9/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cloud9/src/Cloud9Client.ts b/clients/client-cloud9/src/Cloud9Client.ts index 9f9ba4c9af2c..77df8f01e1c0 100644 --- a/clients/client-cloud9/src/Cloud9Client.ts +++ b/clients/client-cloud9/src/Cloud9Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -140,11 +140,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloud9/src/runtimeConfig.browser.ts b/clients/client-cloud9/src/runtimeConfig.browser.ts index 847fc63032da..5a6c2e221aca 100644 --- a/clients/client-cloud9/src/runtimeConfig.browser.ts +++ b/clients/client-cloud9/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: Cloud9ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloud9/src/runtimeConfig.ts b/clients/client-cloud9/src/runtimeConfig.ts index ad3d0f989bdf..8a14c19e8b6a 100644 --- a/clients/client-cloud9/src/runtimeConfig.ts +++ b/clients/client-cloud9/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: Cloud9ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudcontrol/package.json b/clients/client-cloudcontrol/package.json index 7d81e9e7e9b0..1d8c10bb9859 100644 --- a/clients/client-cloudcontrol/package.json +++ b/clients/client-cloudcontrol/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-cloudcontrol/src/CloudControlClient.ts b/clients/client-cloudcontrol/src/CloudControlClient.ts index 48aa66d6d522..e6c62ce80d7f 100644 --- a/clients/client-cloudcontrol/src/CloudControlClient.ts +++ b/clients/client-cloudcontrol/src/CloudControlClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -110,11 +110,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudcontrol/src/runtimeConfig.browser.ts b/clients/client-cloudcontrol/src/runtimeConfig.browser.ts index 23e8719cfd28..f4623ade27bb 100644 --- a/clients/client-cloudcontrol/src/runtimeConfig.browser.ts +++ b/clients/client-cloudcontrol/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudControlClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudcontrol/src/runtimeConfig.ts b/clients/client-cloudcontrol/src/runtimeConfig.ts index 2d3060221a26..c8d2e5f36e1c 100644 --- a/clients/client-cloudcontrol/src/runtimeConfig.ts +++ b/clients/client-cloudcontrol/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudControlClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-clouddirectory/package.json b/clients/client-clouddirectory/package.json index c6f094c39fdb..bce5e04bf27f 100644 --- a/clients/client-clouddirectory/package.json +++ b/clients/client-clouddirectory/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-clouddirectory/src/CloudDirectoryClient.ts b/clients/client-clouddirectory/src/CloudDirectoryClient.ts index 4b734dbdb971..4340a41338d9 100644 --- a/clients/client-clouddirectory/src/CloudDirectoryClient.ts +++ b/clients/client-clouddirectory/src/CloudDirectoryClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -353,11 +353,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-clouddirectory/src/runtimeConfig.browser.ts b/clients/client-clouddirectory/src/runtimeConfig.browser.ts index a2169cc4fbc9..f95180f7ed38 100644 --- a/clients/client-clouddirectory/src/runtimeConfig.browser.ts +++ b/clients/client-clouddirectory/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudDirectoryClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-clouddirectory/src/runtimeConfig.ts b/clients/client-clouddirectory/src/runtimeConfig.ts index cfb9355f34f3..d8ef1ea702ad 100644 --- a/clients/client-clouddirectory/src/runtimeConfig.ts +++ b/clients/client-clouddirectory/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudDirectoryClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudformation/package.json b/clients/client-cloudformation/package.json index 51727b69321d..a3a7d40f6925 100644 --- a/clients/client-cloudformation/package.json +++ b/clients/client-cloudformation/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-cloudformation/src/CloudFormationClient.ts b/clients/client-cloudformation/src/CloudFormationClient.ts index 0651436a0e47..86cec2ab3a9f 100644 --- a/clients/client-cloudformation/src/CloudFormationClient.ts +++ b/clients/client-cloudformation/src/CloudFormationClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -440,11 +440,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudformation/src/runtimeConfig.browser.ts b/clients/client-cloudformation/src/runtimeConfig.browser.ts index 491c6d760bc4..463d7e117385 100644 --- a/clients/client-cloudformation/src/runtimeConfig.browser.ts +++ b/clients/client-cloudformation/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudFormationClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudformation/src/runtimeConfig.ts b/clients/client-cloudformation/src/runtimeConfig.ts index c3108c1b0f4c..df28121200c6 100644 --- a/clients/client-cloudformation/src/runtimeConfig.ts +++ b/clients/client-cloudformation/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudFormationClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudfront-keyvaluestore/package.json b/clients/client-cloudfront-keyvaluestore/package.json index c8d44428542d..ee899505bbc0 100644 --- a/clients/client-cloudfront-keyvaluestore/package.json +++ b/clients/client-cloudfront-keyvaluestore/package.json @@ -34,29 +34,29 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cloudfront-keyvaluestore/src/CloudFrontKeyValueStoreClient.ts b/clients/client-cloudfront-keyvaluestore/src/CloudFrontKeyValueStoreClient.ts index 159de82a361a..fa07e156d5e5 100644 --- a/clients/client-cloudfront-keyvaluestore/src/CloudFrontKeyValueStoreClient.ts +++ b/clients/client-cloudfront-keyvaluestore/src/CloudFrontKeyValueStoreClient.ts @@ -24,7 +24,7 @@ import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@s import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -93,11 +93,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudfront-keyvaluestore/src/runtimeConfig.browser.ts b/clients/client-cloudfront-keyvaluestore/src/runtimeConfig.browser.ts index c45dce0cba4c..721ba12553c2 100644 --- a/clients/client-cloudfront-keyvaluestore/src/runtimeConfig.browser.ts +++ b/clients/client-cloudfront-keyvaluestore/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudFrontKeyValueStoreClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudfront-keyvaluestore/src/runtimeConfig.ts b/clients/client-cloudfront-keyvaluestore/src/runtimeConfig.ts index 68c5419d653c..55c9c128ec53 100644 --- a/clients/client-cloudfront-keyvaluestore/src/runtimeConfig.ts +++ b/clients/client-cloudfront-keyvaluestore/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudFrontKeyValueStoreClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudfront/package.json b/clients/client-cloudfront/package.json index fe186cd47419..36d6c7b58802 100644 --- a/clients/client-cloudfront/package.json +++ b/clients/client-cloudfront/package.json @@ -33,33 +33,33 @@ "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", "@aws-sdk/xml-builder": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-cloudfront/src/CloudFrontClient.ts b/clients/client-cloudfront/src/CloudFrontClient.ts index b72860acba15..f844017c5700 100644 --- a/clients/client-cloudfront/src/CloudFrontClient.ts +++ b/clients/client-cloudfront/src/CloudFrontClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -629,11 +629,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudfront/src/runtimeConfig.browser.ts b/clients/client-cloudfront/src/runtimeConfig.browser.ts index 0e48f1895e18..b0bc16ac2d36 100644 --- a/clients/client-cloudfront/src/runtimeConfig.browser.ts +++ b/clients/client-cloudfront/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudFrontClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudfront/src/runtimeConfig.ts b/clients/client-cloudfront/src/runtimeConfig.ts index 3303fcb45df5..b8c6fdf10865 100644 --- a/clients/client-cloudfront/src/runtimeConfig.ts +++ b/clients/client-cloudfront/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudFrontClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudhsm-v2/package.json b/clients/client-cloudhsm-v2/package.json index b590fa1a76bf..7f6e68650a80 100644 --- a/clients/client-cloudhsm-v2/package.json +++ b/clients/client-cloudhsm-v2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cloudhsm-v2/src/CloudHSMV2Client.ts b/clients/client-cloudhsm-v2/src/CloudHSMV2Client.ts index 195d3cb9caad..2f515a74690e 100644 --- a/clients/client-cloudhsm-v2/src/CloudHSMV2Client.ts +++ b/clients/client-cloudhsm-v2/src/CloudHSMV2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -125,11 +125,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudhsm-v2/src/runtimeConfig.browser.ts b/clients/client-cloudhsm-v2/src/runtimeConfig.browser.ts index 3411ed4b91d3..369abcbe1ac7 100644 --- a/clients/client-cloudhsm-v2/src/runtimeConfig.browser.ts +++ b/clients/client-cloudhsm-v2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudHSMV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudhsm-v2/src/runtimeConfig.ts b/clients/client-cloudhsm-v2/src/runtimeConfig.ts index b09883902314..6d881a37a4d2 100644 --- a/clients/client-cloudhsm-v2/src/runtimeConfig.ts +++ b/clients/client-cloudhsm-v2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudHSMV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudhsm/package.json b/clients/client-cloudhsm/package.json index 97da8a179e7b..559d1cfe7e4c 100644 --- a/clients/client-cloudhsm/package.json +++ b/clients/client-cloudhsm/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cloudhsm/src/CloudHSMClient.ts b/clients/client-cloudhsm/src/CloudHSMClient.ts index 7d7498e42afb..f0eba32909eb 100644 --- a/clients/client-cloudhsm/src/CloudHSMClient.ts +++ b/clients/client-cloudhsm/src/CloudHSMClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -143,11 +143,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudhsm/src/runtimeConfig.browser.ts b/clients/client-cloudhsm/src/runtimeConfig.browser.ts index 642919f3dbee..71b8431d2cd2 100644 --- a/clients/client-cloudhsm/src/runtimeConfig.browser.ts +++ b/clients/client-cloudhsm/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudHSMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudhsm/src/runtimeConfig.ts b/clients/client-cloudhsm/src/runtimeConfig.ts index ab509d558fe1..8929c10ffe27 100644 --- a/clients/client-cloudhsm/src/runtimeConfig.ts +++ b/clients/client-cloudhsm/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudHSMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudsearch-domain/package.json b/clients/client-cloudsearch-domain/package.json index 3bae8b7883e8..4d2320853ad2 100644 --- a/clients/client-cloudsearch-domain/package.json +++ b/clients/client-cloudsearch-domain/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cloudsearch-domain/src/CloudSearchDomainClient.ts b/clients/client-cloudsearch-domain/src/CloudSearchDomainClient.ts index 90d7743203f4..f96c510e1181 100644 --- a/clients/client-cloudsearch-domain/src/CloudSearchDomainClient.ts +++ b/clients/client-cloudsearch-domain/src/CloudSearchDomainClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -80,11 +80,11 @@ export type ServiceOutputTypes = SearchCommandOutput | SuggestCommandOutput | Up /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudsearch-domain/src/runtimeConfig.browser.ts b/clients/client-cloudsearch-domain/src/runtimeConfig.browser.ts index 2a0f25079acd..7c2c6bbc3456 100644 --- a/clients/client-cloudsearch-domain/src/runtimeConfig.browser.ts +++ b/clients/client-cloudsearch-domain/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudSearchDomainClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudsearch-domain/src/runtimeConfig.ts b/clients/client-cloudsearch-domain/src/runtimeConfig.ts index 40e3bdca52e3..ff598ef09d08 100644 --- a/clients/client-cloudsearch-domain/src/runtimeConfig.ts +++ b/clients/client-cloudsearch-domain/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudSearchDomainClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudsearch/package.json b/clients/client-cloudsearch/package.json index d5a4023fa596..7d3f5014acaa 100644 --- a/clients/client-cloudsearch/package.json +++ b/clients/client-cloudsearch/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" diff --git a/clients/client-cloudsearch/src/CloudSearchClient.ts b/clients/client-cloudsearch/src/CloudSearchClient.ts index 739a9af031c0..2bd6367235a7 100644 --- a/clients/client-cloudsearch/src/CloudSearchClient.ts +++ b/clients/client-cloudsearch/src/CloudSearchClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -194,11 +194,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudsearch/src/runtimeConfig.browser.ts b/clients/client-cloudsearch/src/runtimeConfig.browser.ts index 90100a1d32fa..99df830d6f33 100644 --- a/clients/client-cloudsearch/src/runtimeConfig.browser.ts +++ b/clients/client-cloudsearch/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudSearchClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudsearch/src/runtimeConfig.ts b/clients/client-cloudsearch/src/runtimeConfig.ts index bf12376ac37c..0706626f1d64 100644 --- a/clients/client-cloudsearch/src/runtimeConfig.ts +++ b/clients/client-cloudsearch/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudSearchClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudtrail-data/package.json b/clients/client-cloudtrail-data/package.json index 20864032bef4..0a5bca5b88c1 100644 --- a/clients/client-cloudtrail-data/package.json +++ b/clients/client-cloudtrail-data/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cloudtrail-data/src/CloudTrailDataClient.ts b/clients/client-cloudtrail-data/src/CloudTrailDataClient.ts index 3bea43e5abd1..90c37ed705d1 100644 --- a/clients/client-cloudtrail-data/src/CloudTrailDataClient.ts +++ b/clients/client-cloudtrail-data/src/CloudTrailDataClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -78,11 +78,11 @@ export type ServiceOutputTypes = PutAuditEventsCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudtrail-data/src/runtimeConfig.browser.ts b/clients/client-cloudtrail-data/src/runtimeConfig.browser.ts index 6aa3647aab04..7f00b9e832b5 100644 --- a/clients/client-cloudtrail-data/src/runtimeConfig.browser.ts +++ b/clients/client-cloudtrail-data/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudTrailDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudtrail-data/src/runtimeConfig.ts b/clients/client-cloudtrail-data/src/runtimeConfig.ts index 03e48b782097..855e51858559 100644 --- a/clients/client-cloudtrail-data/src/runtimeConfig.ts +++ b/clients/client-cloudtrail-data/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudTrailDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudtrail/package.json b/clients/client-cloudtrail/package.json index 83f061d7bffc..a1e2d711bbce 100644 --- a/clients/client-cloudtrail/package.json +++ b/clients/client-cloudtrail/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cloudtrail/src/CloudTrailClient.ts b/clients/client-cloudtrail/src/CloudTrailClient.ts index d8cfdd106fcb..ed42d9e1fb96 100644 --- a/clients/client-cloudtrail/src/CloudTrailClient.ts +++ b/clients/client-cloudtrail/src/CloudTrailClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -263,11 +263,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudtrail/src/runtimeConfig.browser.ts b/clients/client-cloudtrail/src/runtimeConfig.browser.ts index 53a70f05d3a6..31de6d9ac786 100644 --- a/clients/client-cloudtrail/src/runtimeConfig.browser.ts +++ b/clients/client-cloudtrail/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudTrailClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudtrail/src/runtimeConfig.ts b/clients/client-cloudtrail/src/runtimeConfig.ts index 018a61d0b7b6..a31af6497d5b 100644 --- a/clients/client-cloudtrail/src/runtimeConfig.ts +++ b/clients/client-cloudtrail/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudTrailClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudwatch-events/package.json b/clients/client-cloudwatch-events/package.json index b3a956db7675..b3a67f2e7b1e 100644 --- a/clients/client-cloudwatch-events/package.json +++ b/clients/client-cloudwatch-events/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cloudwatch-events/src/CloudWatchEventsClient.ts b/clients/client-cloudwatch-events/src/CloudWatchEventsClient.ts index 5b44681a897e..a55d5d8c90a1 100644 --- a/clients/client-cloudwatch-events/src/CloudWatchEventsClient.ts +++ b/clients/client-cloudwatch-events/src/CloudWatchEventsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -278,11 +278,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudwatch-events/src/runtimeConfig.browser.ts b/clients/client-cloudwatch-events/src/runtimeConfig.browser.ts index 611b516ce527..8d9c7f62b431 100644 --- a/clients/client-cloudwatch-events/src/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch-events/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CloudWatchEventsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudwatch-events/src/runtimeConfig.ts b/clients/client-cloudwatch-events/src/runtimeConfig.ts index 80ba03f557b4..fa5f2e1c6210 100644 --- a/clients/client-cloudwatch-events/src/runtimeConfig.ts +++ b/clients/client-cloudwatch-events/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CloudWatchEventsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudwatch-logs/package.json b/clients/client-cloudwatch-logs/package.json index 7373dfb9d6a9..68d0435693c8 100644 --- a/clients/client-cloudwatch-logs/package.json +++ b/clients/client-cloudwatch-logs/package.json @@ -32,33 +32,33 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts b/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts index 15faa34ffd9c..0314935cbf01 100644 --- a/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts +++ b/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -401,11 +401,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts b/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts index 4f75985e8e7c..6ff05986d101 100644 --- a/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts @@ -36,7 +36,7 @@ export const getRuntimeConfig = (config: CloudWatchLogsClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cloudwatch-logs/src/runtimeConfig.ts b/clients/client-cloudwatch-logs/src/runtimeConfig.ts index 943aaea0d68b..f9057f44790d 100644 --- a/clients/client-cloudwatch-logs/src/runtimeConfig.ts +++ b/clients/client-cloudwatch-logs/src/runtimeConfig.ts @@ -46,7 +46,7 @@ export const getRuntimeConfig = (config: CloudWatchLogsClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cloudwatch/package.json b/clients/client-cloudwatch/package.json index 9f54923df36a..c220cf81209d 100644 --- a/clients/client-cloudwatch/package.json +++ b/clients/client-cloudwatch/package.json @@ -32,33 +32,33 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-compression": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-compression": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-cloudwatch/src/CloudWatchClient.ts b/clients/client-cloudwatch/src/CloudWatchClient.ts index 7eb51f37fec3..674567841468 100644 --- a/clients/client-cloudwatch/src/CloudWatchClient.ts +++ b/clients/client-cloudwatch/src/CloudWatchClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -235,11 +235,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cloudwatch/src/runtimeConfig.browser.ts b/clients/client-cloudwatch/src/runtimeConfig.browser.ts index 37ace1c17b48..6ebd37d675ae 100644 --- a/clients/client-cloudwatch/src/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch/src/runtimeConfig.browser.ts @@ -39,7 +39,7 @@ export const getRuntimeConfig = (config: CloudWatchClientConfig) => { disableRequestCompression: config?.disableRequestCompression ?? DEFAULT_DISABLE_REQUEST_COMPRESSION, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES, retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), diff --git a/clients/client-cloudwatch/src/runtimeConfig.ts b/clients/client-cloudwatch/src/runtimeConfig.ts index 35d3e4db6091..e15e10bdcd58 100644 --- a/clients/client-cloudwatch/src/runtimeConfig.ts +++ b/clients/client-cloudwatch/src/runtimeConfig.ts @@ -50,7 +50,7 @@ export const getRuntimeConfig = (config: CloudWatchClientConfig) => { config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS), retryMode: diff --git a/clients/client-codeartifact/package.json b/clients/client-codeartifact/package.json index 222a78aa36e8..11b560f66b1b 100644 --- a/clients/client-codeartifact/package.json +++ b/clients/client-codeartifact/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-codeartifact/src/CodeartifactClient.ts b/clients/client-codeartifact/src/CodeartifactClient.ts index f9ecc184443c..fc3286182712 100644 --- a/clients/client-codeartifact/src/CodeartifactClient.ts +++ b/clients/client-codeartifact/src/CodeartifactClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -264,11 +264,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codeartifact/src/runtimeConfig.browser.ts b/clients/client-codeartifact/src/runtimeConfig.browser.ts index 22ee9157d3c2..0ab355f6d0e3 100644 --- a/clients/client-codeartifact/src/runtimeConfig.browser.ts +++ b/clients/client-codeartifact/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodeartifactClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codeartifact/src/runtimeConfig.ts b/clients/client-codeartifact/src/runtimeConfig.ts index b0205ee3dba9..1852f1d5737a 100644 --- a/clients/client-codeartifact/src/runtimeConfig.ts +++ b/clients/client-codeartifact/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodeartifactClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codebuild/package.json b/clients/client-codebuild/package.json index eeb98ad22264..aa11a0e65a05 100644 --- a/clients/client-codebuild/package.json +++ b/clients/client-codebuild/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-codebuild/src/CodeBuildClient.ts b/clients/client-codebuild/src/CodeBuildClient.ts index beb35c5f0886..4e2dae319738 100644 --- a/clients/client-codebuild/src/CodeBuildClient.ts +++ b/clients/client-codebuild/src/CodeBuildClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -272,11 +272,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codebuild/src/runtimeConfig.browser.ts b/clients/client-codebuild/src/runtimeConfig.browser.ts index a6512381759e..969968aec931 100644 --- a/clients/client-codebuild/src/runtimeConfig.browser.ts +++ b/clients/client-codebuild/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodeBuildClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codebuild/src/runtimeConfig.ts b/clients/client-codebuild/src/runtimeConfig.ts index a332fdee9690..0246e7e7cb50 100644 --- a/clients/client-codebuild/src/runtimeConfig.ts +++ b/clients/client-codebuild/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodeBuildClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codecatalyst/package.json b/clients/client-codecatalyst/package.json index fce8bd6cf21b..bb1eb7958242 100644 --- a/clients/client-codecatalyst/package.json +++ b/clients/client-codecatalyst/package.json @@ -31,30 +31,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-codecatalyst/src/CodeCatalystClient.ts b/clients/client-codecatalyst/src/CodeCatalystClient.ts index 69d5d9edd96f..6bb07163b065 100644 --- a/clients/client-codecatalyst/src/CodeCatalystClient.ts +++ b/clients/client-codecatalyst/src/CodeCatalystClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -235,11 +235,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codecatalyst/src/runtimeConfig.browser.ts b/clients/client-codecatalyst/src/runtimeConfig.browser.ts index 27d40ffd6d3d..9b04d8e22c3f 100644 --- a/clients/client-codecatalyst/src/runtimeConfig.browser.ts +++ b/clients/client-codecatalyst/src/runtimeConfig.browser.ts @@ -30,7 +30,7 @@ export const getRuntimeConfig = (config: CodeCatalystClientConfig) => { config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codecatalyst/src/runtimeConfig.ts b/clients/client-codecatalyst/src/runtimeConfig.ts index 8f061f8a015d..dd7f53b38589 100644 --- a/clients/client-codecatalyst/src/runtimeConfig.ts +++ b/clients/client-codecatalyst/src/runtimeConfig.ts @@ -51,7 +51,7 @@ export const getRuntimeConfig = (config: CodeCatalystClientConfig) => { }, ], maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codecommit/package.json b/clients/client-codecommit/package.json index bf71dc5ed528..91494a910b20 100644 --- a/clients/client-codecommit/package.json +++ b/clients/client-codecommit/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-codecommit/src/CodeCommitClient.ts b/clients/client-codecommit/src/CodeCommitClient.ts index 49e08ca191d9..dfc14b91a0e5 100644 --- a/clients/client-codecommit/src/CodeCommitClient.ts +++ b/clients/client-codecommit/src/CodeCommitClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -464,11 +464,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codecommit/src/runtimeConfig.browser.ts b/clients/client-codecommit/src/runtimeConfig.browser.ts index 753d0b13c177..45f5570c1a21 100644 --- a/clients/client-codecommit/src/runtimeConfig.browser.ts +++ b/clients/client-codecommit/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodeCommitClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codecommit/src/runtimeConfig.ts b/clients/client-codecommit/src/runtimeConfig.ts index b9ecbe2e9e52..b6652e83f593 100644 --- a/clients/client-codecommit/src/runtimeConfig.ts +++ b/clients/client-codecommit/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodeCommitClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codedeploy/package.json b/clients/client-codedeploy/package.json index 877997a0c074..3c44e0bc2d6e 100644 --- a/clients/client-codedeploy/package.json +++ b/clients/client-codedeploy/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-codedeploy/src/CodeDeployClient.ts b/clients/client-codedeploy/src/CodeDeployClient.ts index b2cfc6299cb0..0ea6f356dc4c 100644 --- a/clients/client-codedeploy/src/CodeDeployClient.ts +++ b/clients/client-codedeploy/src/CodeDeployClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -320,11 +320,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codedeploy/src/runtimeConfig.browser.ts b/clients/client-codedeploy/src/runtimeConfig.browser.ts index 2c1801f0c234..c5aae14187b5 100644 --- a/clients/client-codedeploy/src/runtimeConfig.browser.ts +++ b/clients/client-codedeploy/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodeDeployClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codedeploy/src/runtimeConfig.ts b/clients/client-codedeploy/src/runtimeConfig.ts index d36a0f4fdf45..4b04d74663de 100644 --- a/clients/client-codedeploy/src/runtimeConfig.ts +++ b/clients/client-codedeploy/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodeDeployClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codeguru-reviewer/package.json b/clients/client-codeguru-reviewer/package.json index 85edc4361508..61cd182eb222 100644 --- a/clients/client-codeguru-reviewer/package.json +++ b/clients/client-codeguru-reviewer/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-codeguru-reviewer/src/CodeGuruReviewerClient.ts b/clients/client-codeguru-reviewer/src/CodeGuruReviewerClient.ts index 0a1ffac6b1ad..c7e23c0fe269 100644 --- a/clients/client-codeguru-reviewer/src/CodeGuruReviewerClient.ts +++ b/clients/client-codeguru-reviewer/src/CodeGuruReviewerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -146,11 +146,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codeguru-reviewer/src/runtimeConfig.browser.ts b/clients/client-codeguru-reviewer/src/runtimeConfig.browser.ts index 1806ceb4f6bf..c97f0172d69c 100644 --- a/clients/client-codeguru-reviewer/src/runtimeConfig.browser.ts +++ b/clients/client-codeguru-reviewer/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodeGuruReviewerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codeguru-reviewer/src/runtimeConfig.ts b/clients/client-codeguru-reviewer/src/runtimeConfig.ts index fe31ea63e9b8..26c03001a05d 100644 --- a/clients/client-codeguru-reviewer/src/runtimeConfig.ts +++ b/clients/client-codeguru-reviewer/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodeGuruReviewerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codeguru-security/package.json b/clients/client-codeguru-security/package.json index 86658631c0ef..01c64a0f27ec 100644 --- a/clients/client-codeguru-security/package.json +++ b/clients/client-codeguru-security/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-codeguru-security/src/CodeGuruSecurityClient.ts b/clients/client-codeguru-security/src/CodeGuruSecurityClient.ts index dc6d39d6f887..62ba448b2d77 100644 --- a/clients/client-codeguru-security/src/CodeGuruSecurityClient.ts +++ b/clients/client-codeguru-security/src/CodeGuruSecurityClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -128,11 +128,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codeguru-security/src/runtimeConfig.browser.ts b/clients/client-codeguru-security/src/runtimeConfig.browser.ts index c2b5bddaa59b..8aa1a2c2fa0c 100644 --- a/clients/client-codeguru-security/src/runtimeConfig.browser.ts +++ b/clients/client-codeguru-security/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodeGuruSecurityClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codeguru-security/src/runtimeConfig.ts b/clients/client-codeguru-security/src/runtimeConfig.ts index 4b041e5f8da3..774c736628ce 100644 --- a/clients/client-codeguru-security/src/runtimeConfig.ts +++ b/clients/client-codeguru-security/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodeGuruSecurityClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codeguruprofiler/package.json b/clients/client-codeguruprofiler/package.json index c67310022538..eaeaf2f0f945 100644 --- a/clients/client-codeguruprofiler/package.json +++ b/clients/client-codeguruprofiler/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-codeguruprofiler/src/CodeGuruProfilerClient.ts b/clients/client-codeguruprofiler/src/CodeGuruProfilerClient.ts index 94c82420b0e7..95946ecd79b0 100644 --- a/clients/client-codeguruprofiler/src/CodeGuruProfilerClient.ts +++ b/clients/client-codeguruprofiler/src/CodeGuruProfilerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -182,11 +182,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codeguruprofiler/src/runtimeConfig.browser.ts b/clients/client-codeguruprofiler/src/runtimeConfig.browser.ts index a26838ff7efe..7982a3185357 100644 --- a/clients/client-codeguruprofiler/src/runtimeConfig.browser.ts +++ b/clients/client-codeguruprofiler/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodeGuruProfilerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codeguruprofiler/src/runtimeConfig.ts b/clients/client-codeguruprofiler/src/runtimeConfig.ts index 68b849a4520d..aff3034568fb 100644 --- a/clients/client-codeguruprofiler/src/runtimeConfig.ts +++ b/clients/client-codeguruprofiler/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodeGuruProfilerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codepipeline/package.json b/clients/client-codepipeline/package.json index 2c6bcd281a9e..50aab39b9dfb 100644 --- a/clients/client-codepipeline/package.json +++ b/clients/client-codepipeline/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-codepipeline/src/CodePipelineClient.ts b/clients/client-codepipeline/src/CodePipelineClient.ts index d2572b9657a0..2ff60cbb1e0d 100644 --- a/clients/client-codepipeline/src/CodePipelineClient.ts +++ b/clients/client-codepipeline/src/CodePipelineClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -254,11 +254,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codepipeline/src/runtimeConfig.browser.ts b/clients/client-codepipeline/src/runtimeConfig.browser.ts index bc34101222df..4e359d4394c3 100644 --- a/clients/client-codepipeline/src/runtimeConfig.browser.ts +++ b/clients/client-codepipeline/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodePipelineClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codepipeline/src/runtimeConfig.ts b/clients/client-codepipeline/src/runtimeConfig.ts index 3c2ad697f71b..5ca83af279e0 100644 --- a/clients/client-codepipeline/src/runtimeConfig.ts +++ b/clients/client-codepipeline/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodePipelineClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codestar-connections/package.json b/clients/client-codestar-connections/package.json index 4ff9f962ab6c..1b2a824aa79f 100644 --- a/clients/client-codestar-connections/package.json +++ b/clients/client-codestar-connections/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-codestar-connections/src/CodeStarConnectionsClient.ts b/clients/client-codestar-connections/src/CodeStarConnectionsClient.ts index ca475e46ae3f..6ad84243bb6c 100644 --- a/clients/client-codestar-connections/src/CodeStarConnectionsClient.ts +++ b/clients/client-codestar-connections/src/CodeStarConnectionsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -200,11 +200,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codestar-connections/src/runtimeConfig.browser.ts b/clients/client-codestar-connections/src/runtimeConfig.browser.ts index 3ce780a874b3..32fa8c0b0041 100644 --- a/clients/client-codestar-connections/src/runtimeConfig.browser.ts +++ b/clients/client-codestar-connections/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodeStarConnectionsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codestar-connections/src/runtimeConfig.ts b/clients/client-codestar-connections/src/runtimeConfig.ts index b61404f6a8b9..2346a5b9677c 100644 --- a/clients/client-codestar-connections/src/runtimeConfig.ts +++ b/clients/client-codestar-connections/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodeStarConnectionsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codestar-notifications/package.json b/clients/client-codestar-notifications/package.json index 42243b6993f0..2492331a5156 100644 --- a/clients/client-codestar-notifications/package.json +++ b/clients/client-codestar-notifications/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-codestar-notifications/src/CodestarNotificationsClient.ts b/clients/client-codestar-notifications/src/CodestarNotificationsClient.ts index 765077a6efee..d3ca6ba0ef24 100644 --- a/clients/client-codestar-notifications/src/CodestarNotificationsClient.ts +++ b/clients/client-codestar-notifications/src/CodestarNotificationsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -134,11 +134,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codestar-notifications/src/runtimeConfig.browser.ts b/clients/client-codestar-notifications/src/runtimeConfig.browser.ts index 895137adb12c..cbe231216426 100644 --- a/clients/client-codestar-notifications/src/runtimeConfig.browser.ts +++ b/clients/client-codestar-notifications/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodestarNotificationsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codestar-notifications/src/runtimeConfig.ts b/clients/client-codestar-notifications/src/runtimeConfig.ts index 2ee70efdf625..f60e1437231f 100644 --- a/clients/client-codestar-notifications/src/runtimeConfig.ts +++ b/clients/client-codestar-notifications/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodestarNotificationsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-codestar/package.json b/clients/client-codestar/package.json index d94870746926..f96ac0e8eef2 100644 --- a/clients/client-codestar/package.json +++ b/clients/client-codestar/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-codestar/src/CodeStarClient.ts b/clients/client-codestar/src/CodeStarClient.ts index 10b038cf5aa9..d2329f309422 100644 --- a/clients/client-codestar/src/CodeStarClient.ts +++ b/clients/client-codestar/src/CodeStarClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -140,11 +140,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-codestar/src/runtimeConfig.browser.ts b/clients/client-codestar/src/runtimeConfig.browser.ts index 44570f5deac0..ec8710e02954 100644 --- a/clients/client-codestar/src/runtimeConfig.browser.ts +++ b/clients/client-codestar/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CodeStarClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-codestar/src/runtimeConfig.ts b/clients/client-codestar/src/runtimeConfig.ts index de34f4359696..b66c8cf1eb50 100644 --- a/clients/client-codestar/src/runtimeConfig.ts +++ b/clients/client-codestar/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CodeStarClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cognito-identity-provider/package.json b/clients/client-cognito-identity-provider/package.json index 92394b2f40ae..63a9a1a9cdfe 100644 --- a/clients/client-cognito-identity-provider/package.json +++ b/clients/client-cognito-identity-provider/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cognito-identity-provider/src/CognitoIdentityProviderClient.ts b/clients/client-cognito-identity-provider/src/CognitoIdentityProviderClient.ts index 2f00c2454ab8..87885a8de427 100644 --- a/clients/client-cognito-identity-provider/src/CognitoIdentityProviderClient.ts +++ b/clients/client-cognito-identity-provider/src/CognitoIdentityProviderClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -560,11 +560,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cognito-identity-provider/src/runtimeConfig.browser.ts b/clients/client-cognito-identity-provider/src/runtimeConfig.browser.ts index 31c8236e1121..c12efc061b91 100644 --- a/clients/client-cognito-identity-provider/src/runtimeConfig.browser.ts +++ b/clients/client-cognito-identity-provider/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CognitoIdentityProviderClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cognito-identity-provider/src/runtimeConfig.ts b/clients/client-cognito-identity-provider/src/runtimeConfig.ts index b114ada58a70..52814774ba9a 100644 --- a/clients/client-cognito-identity-provider/src/runtimeConfig.ts +++ b/clients/client-cognito-identity-provider/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CognitoIdentityProviderClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cognito-identity/package.json b/clients/client-cognito-identity/package.json index 2694d3beebf2..418143506f2a 100644 --- a/clients/client-cognito-identity/package.json +++ b/clients/client-cognito-identity/package.json @@ -33,30 +33,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cognito-identity/src/CognitoIdentityClient.ts b/clients/client-cognito-identity/src/CognitoIdentityClient.ts index 88e949e86d21..8f87ba0da7d6 100644 --- a/clients/client-cognito-identity/src/CognitoIdentityClient.ts +++ b/clients/client-cognito-identity/src/CognitoIdentityClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -179,11 +179,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cognito-identity/src/runtimeConfig.browser.ts b/clients/client-cognito-identity/src/runtimeConfig.browser.ts index bb478e4db777..23c109cfcb07 100644 --- a/clients/client-cognito-identity/src/runtimeConfig.browser.ts +++ b/clients/client-cognito-identity/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CognitoIdentityClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cognito-identity/src/runtimeConfig.ts b/clients/client-cognito-identity/src/runtimeConfig.ts index 5a11ba04db5e..5f6eb8a5e6a7 100644 --- a/clients/client-cognito-identity/src/runtimeConfig.ts +++ b/clients/client-cognito-identity/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CognitoIdentityClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cognito-sync/package.json b/clients/client-cognito-sync/package.json index cad68d7b904f..baa0379a2949 100644 --- a/clients/client-cognito-sync/package.json +++ b/clients/client-cognito-sync/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cognito-sync/src/CognitoSyncClient.ts b/clients/client-cognito-sync/src/CognitoSyncClient.ts index ef1ea47cd23c..723fbf179708 100644 --- a/clients/client-cognito-sync/src/CognitoSyncClient.ts +++ b/clients/client-cognito-sync/src/CognitoSyncClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -149,11 +149,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cognito-sync/src/runtimeConfig.browser.ts b/clients/client-cognito-sync/src/runtimeConfig.browser.ts index f43d12faf9f9..8d42bb3c40a8 100644 --- a/clients/client-cognito-sync/src/runtimeConfig.browser.ts +++ b/clients/client-cognito-sync/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CognitoSyncClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cognito-sync/src/runtimeConfig.ts b/clients/client-cognito-sync/src/runtimeConfig.ts index 0f9eb3fd6e4b..24a2f2fe8010 100644 --- a/clients/client-cognito-sync/src/runtimeConfig.ts +++ b/clients/client-cognito-sync/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CognitoSyncClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-comprehend/package.json b/clients/client-comprehend/package.json index e6d38147fa69..46b810b26dca 100644 --- a/clients/client-comprehend/package.json +++ b/clients/client-comprehend/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-comprehend/src/ComprehendClient.ts b/clients/client-comprehend/src/ComprehendClient.ts index 3e6c029e835a..4ca2ae51e945 100644 --- a/clients/client-comprehend/src/ComprehendClient.ts +++ b/clients/client-comprehend/src/ComprehendClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -512,11 +512,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-comprehend/src/runtimeConfig.browser.ts b/clients/client-comprehend/src/runtimeConfig.browser.ts index 7ccec2b075a9..203a282da9de 100644 --- a/clients/client-comprehend/src/runtimeConfig.browser.ts +++ b/clients/client-comprehend/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ComprehendClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-comprehend/src/runtimeConfig.ts b/clients/client-comprehend/src/runtimeConfig.ts index 25b43735690c..55dae7c4dd28 100644 --- a/clients/client-comprehend/src/runtimeConfig.ts +++ b/clients/client-comprehend/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ComprehendClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-comprehendmedical/package.json b/clients/client-comprehendmedical/package.json index 7a194aaabd12..a9f167167acb 100644 --- a/clients/client-comprehendmedical/package.json +++ b/clients/client-comprehendmedical/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-comprehendmedical/src/ComprehendMedicalClient.ts b/clients/client-comprehendmedical/src/ComprehendMedicalClient.ts index 30187c86b516..0123bcf4f495 100644 --- a/clients/client-comprehendmedical/src/ComprehendMedicalClient.ts +++ b/clients/client-comprehendmedical/src/ComprehendMedicalClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -215,11 +215,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-comprehendmedical/src/runtimeConfig.browser.ts b/clients/client-comprehendmedical/src/runtimeConfig.browser.ts index 9f85a0261b7f..8a87b1fbcf35 100644 --- a/clients/client-comprehendmedical/src/runtimeConfig.browser.ts +++ b/clients/client-comprehendmedical/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ComprehendMedicalClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-comprehendmedical/src/runtimeConfig.ts b/clients/client-comprehendmedical/src/runtimeConfig.ts index 92b4de6cf1ac..8896e8f27a62 100644 --- a/clients/client-comprehendmedical/src/runtimeConfig.ts +++ b/clients/client-comprehendmedical/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ComprehendMedicalClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-compute-optimizer/package.json b/clients/client-compute-optimizer/package.json index e3c7d497ef49..3a2410cf6622 100644 --- a/clients/client-compute-optimizer/package.json +++ b/clients/client-compute-optimizer/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts b/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts index a0a50f1b4053..c76a191fa48b 100644 --- a/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts +++ b/clients/client-compute-optimizer/src/ComputeOptimizerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -215,11 +215,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-compute-optimizer/src/runtimeConfig.browser.ts b/clients/client-compute-optimizer/src/runtimeConfig.browser.ts index 4ca3465f8708..bfb173179e1d 100644 --- a/clients/client-compute-optimizer/src/runtimeConfig.browser.ts +++ b/clients/client-compute-optimizer/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ComputeOptimizerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-compute-optimizer/src/runtimeConfig.ts b/clients/client-compute-optimizer/src/runtimeConfig.ts index 27ad6f8d3253..fbfa5f7dc003 100644 --- a/clients/client-compute-optimizer/src/runtimeConfig.ts +++ b/clients/client-compute-optimizer/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ComputeOptimizerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-config-service/package.json b/clients/client-config-service/package.json index e2b76103587e..920399242c4f 100644 --- a/clients/client-config-service/package.json +++ b/clients/client-config-service/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-config-service/src/ConfigServiceClient.ts b/clients/client-config-service/src/ConfigServiceClient.ts index 51e0b4e8f74b..796573192054 100644 --- a/clients/client-config-service/src/ConfigServiceClient.ts +++ b/clients/client-config-service/src/ConfigServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -593,11 +593,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-config-service/src/runtimeConfig.browser.ts b/clients/client-config-service/src/runtimeConfig.browser.ts index ec34b91dc717..dae8801d586a 100644 --- a/clients/client-config-service/src/runtimeConfig.browser.ts +++ b/clients/client-config-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ConfigServiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-config-service/src/runtimeConfig.ts b/clients/client-config-service/src/runtimeConfig.ts index 9f918ad9cd91..86eb15cbdee5 100644 --- a/clients/client-config-service/src/runtimeConfig.ts +++ b/clients/client-config-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ConfigServiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-connect-contact-lens/package.json b/clients/client-connect-contact-lens/package.json index fe2985bd703a..053bbb1e303a 100644 --- a/clients/client-connect-contact-lens/package.json +++ b/clients/client-connect-contact-lens/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-connect-contact-lens/src/ConnectContactLensClient.ts b/clients/client-connect-contact-lens/src/ConnectContactLensClient.ts index a497a297c535..db1cb551a6c0 100644 --- a/clients/client-connect-contact-lens/src/ConnectContactLensClient.ts +++ b/clients/client-connect-contact-lens/src/ConnectContactLensClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -81,11 +81,11 @@ export type ServiceOutputTypes = ListRealtimeContactAnalysisSegmentsCommandOutpu /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-connect-contact-lens/src/runtimeConfig.browser.ts b/clients/client-connect-contact-lens/src/runtimeConfig.browser.ts index 545e1d4c82d5..362d6c5fa73f 100644 --- a/clients/client-connect-contact-lens/src/runtimeConfig.browser.ts +++ b/clients/client-connect-contact-lens/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ConnectContactLensClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-connect-contact-lens/src/runtimeConfig.ts b/clients/client-connect-contact-lens/src/runtimeConfig.ts index cedb4a92cf52..b8ee3fc6215b 100644 --- a/clients/client-connect-contact-lens/src/runtimeConfig.ts +++ b/clients/client-connect-contact-lens/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ConnectContactLensClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-connect/package.json b/clients/client-connect/package.json index 11ebb2fcc8d1..0d6fdaddb206 100644 --- a/clients/client-connect/package.json +++ b/clients/client-connect/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-connect/src/ConnectClient.ts b/clients/client-connect/src/ConnectClient.ts index 7f0237f8381b..d504e1adecf4 100644 --- a/clients/client-connect/src/ConnectClient.ts +++ b/clients/client-connect/src/ConnectClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -1238,11 +1238,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-connect/src/runtimeConfig.browser.ts b/clients/client-connect/src/runtimeConfig.browser.ts index fd4f7359d4f5..0cb972f8592f 100644 --- a/clients/client-connect/src/runtimeConfig.browser.ts +++ b/clients/client-connect/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-connect/src/runtimeConfig.ts b/clients/client-connect/src/runtimeConfig.ts index b588ee9cded4..7858b849bd44 100644 --- a/clients/client-connect/src/runtimeConfig.ts +++ b/clients/client-connect/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-connectcampaigns/package.json b/clients/client-connectcampaigns/package.json index dbfa403fba58..48b9c9732f28 100644 --- a/clients/client-connectcampaigns/package.json +++ b/clients/client-connectcampaigns/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-connectcampaigns/src/ConnectCampaignsClient.ts b/clients/client-connectcampaigns/src/ConnectCampaignsClient.ts index 4111ac9f0d1e..c252c700ef28 100644 --- a/clients/client-connectcampaigns/src/ConnectCampaignsClient.ts +++ b/clients/client-connectcampaigns/src/ConnectCampaignsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -173,11 +173,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-connectcampaigns/src/runtimeConfig.browser.ts b/clients/client-connectcampaigns/src/runtimeConfig.browser.ts index 74d40135fb3a..606da1eacfc6 100644 --- a/clients/client-connectcampaigns/src/runtimeConfig.browser.ts +++ b/clients/client-connectcampaigns/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ConnectCampaignsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-connectcampaigns/src/runtimeConfig.ts b/clients/client-connectcampaigns/src/runtimeConfig.ts index c6f5de64c93c..a4ecda0e9a5a 100644 --- a/clients/client-connectcampaigns/src/runtimeConfig.ts +++ b/clients/client-connectcampaigns/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ConnectCampaignsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-connectcases/package.json b/clients/client-connectcases/package.json index 6cc0d33be0ea..e6f2c02aaa49 100644 --- a/clients/client-connectcases/package.json +++ b/clients/client-connectcases/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-connectcases/src/ConnectCasesClient.ts b/clients/client-connectcases/src/ConnectCasesClient.ts index fc60e73254f9..92bb559bbdc4 100644 --- a/clients/client-connectcases/src/ConnectCasesClient.ts +++ b/clients/client-connectcases/src/ConnectCasesClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -185,11 +185,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-connectcases/src/runtimeConfig.browser.ts b/clients/client-connectcases/src/runtimeConfig.browser.ts index e0285b4b4ef2..203d2ed2cf3a 100644 --- a/clients/client-connectcases/src/runtimeConfig.browser.ts +++ b/clients/client-connectcases/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ConnectCasesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-connectcases/src/runtimeConfig.ts b/clients/client-connectcases/src/runtimeConfig.ts index 8ad3918619f7..d194358c447d 100644 --- a/clients/client-connectcases/src/runtimeConfig.ts +++ b/clients/client-connectcases/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ConnectCasesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-connectparticipant/package.json b/clients/client-connectparticipant/package.json index 3eaadd774ecb..e199ab976ab7 100644 --- a/clients/client-connectparticipant/package.json +++ b/clients/client-connectparticipant/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-connectparticipant/src/ConnectParticipantClient.ts b/clients/client-connectparticipant/src/ConnectParticipantClient.ts index 1e46de1f28f9..e4cb48c601be 100644 --- a/clients/client-connectparticipant/src/ConnectParticipantClient.ts +++ b/clients/client-connectparticipant/src/ConnectParticipantClient.ts @@ -28,7 +28,7 @@ import { RetryInputConfig, RetryResolvedConfig, } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -122,11 +122,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-connectparticipant/src/runtimeConfig.browser.ts b/clients/client-connectparticipant/src/runtimeConfig.browser.ts index 389e32c89380..a00e704e320e 100644 --- a/clients/client-connectparticipant/src/runtimeConfig.browser.ts +++ b/clients/client-connectparticipant/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ConnectParticipantClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-connectparticipant/src/runtimeConfig.ts b/clients/client-connectparticipant/src/runtimeConfig.ts index 9fc18f92c18d..a60cf835ec71 100644 --- a/clients/client-connectparticipant/src/runtimeConfig.ts +++ b/clients/client-connectparticipant/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ConnectParticipantClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-controltower/package.json b/clients/client-controltower/package.json index 420b97f1c61e..8eb8637ca303 100644 --- a/clients/client-controltower/package.json +++ b/clients/client-controltower/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-controltower/src/ControlTowerClient.ts b/clients/client-controltower/src/ControlTowerClient.ts index 57b21308d714..31ad1a4298d2 100644 --- a/clients/client-controltower/src/ControlTowerClient.ts +++ b/clients/client-controltower/src/ControlTowerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -179,11 +179,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-controltower/src/runtimeConfig.browser.ts b/clients/client-controltower/src/runtimeConfig.browser.ts index be646b667c17..a501ee1bd463 100644 --- a/clients/client-controltower/src/runtimeConfig.browser.ts +++ b/clients/client-controltower/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ControlTowerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-controltower/src/runtimeConfig.ts b/clients/client-controltower/src/runtimeConfig.ts index 270db1fa07b8..b8fec73eef41 100644 --- a/clients/client-controltower/src/runtimeConfig.ts +++ b/clients/client-controltower/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ControlTowerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cost-and-usage-report-service/package.json b/clients/client-cost-and-usage-report-service/package.json index fd5495ebc8cd..8bd833f5cee7 100644 --- a/clients/client-cost-and-usage-report-service/package.json +++ b/clients/client-cost-and-usage-report-service/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cost-and-usage-report-service/src/CostAndUsageReportServiceClient.ts b/clients/client-cost-and-usage-report-service/src/CostAndUsageReportServiceClient.ts index f1843f8ab0d6..87a8dc191ea2 100644 --- a/clients/client-cost-and-usage-report-service/src/CostAndUsageReportServiceClient.ts +++ b/clients/client-cost-and-usage-report-service/src/CostAndUsageReportServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -113,11 +113,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cost-and-usage-report-service/src/runtimeConfig.browser.ts b/clients/client-cost-and-usage-report-service/src/runtimeConfig.browser.ts index e29c142ba655..927290e9809f 100644 --- a/clients/client-cost-and-usage-report-service/src/runtimeConfig.browser.ts +++ b/clients/client-cost-and-usage-report-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CostAndUsageReportServiceClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cost-and-usage-report-service/src/runtimeConfig.ts b/clients/client-cost-and-usage-report-service/src/runtimeConfig.ts index bb51164fd11a..b04f3520be7a 100644 --- a/clients/client-cost-and-usage-report-service/src/runtimeConfig.ts +++ b/clients/client-cost-and-usage-report-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CostAndUsageReportServiceClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cost-explorer/package.json b/clients/client-cost-explorer/package.json index a9901e41005b..72219d6b546e 100644 --- a/clients/client-cost-explorer/package.json +++ b/clients/client-cost-explorer/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cost-explorer/src/CostExplorerClient.ts b/clients/client-cost-explorer/src/CostExplorerClient.ts index b061d3ef6318..478e6ac18318 100644 --- a/clients/client-cost-explorer/src/CostExplorerClient.ts +++ b/clients/client-cost-explorer/src/CostExplorerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -275,11 +275,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cost-explorer/src/runtimeConfig.browser.ts b/clients/client-cost-explorer/src/runtimeConfig.browser.ts index 8d253fdc60b5..3d15065dff24 100644 --- a/clients/client-cost-explorer/src/runtimeConfig.browser.ts +++ b/clients/client-cost-explorer/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CostExplorerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cost-explorer/src/runtimeConfig.ts b/clients/client-cost-explorer/src/runtimeConfig.ts index 70b2bd942aed..eb1dfc00cf25 100644 --- a/clients/client-cost-explorer/src/runtimeConfig.ts +++ b/clients/client-cost-explorer/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CostExplorerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-cost-optimization-hub/package.json b/clients/client-cost-optimization-hub/package.json index d5b1f4606ad7..d7f9b8649827 100644 --- a/clients/client-cost-optimization-hub/package.json +++ b/clients/client-cost-optimization-hub/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-cost-optimization-hub/src/CostOptimizationHubClient.ts b/clients/client-cost-optimization-hub/src/CostOptimizationHubClient.ts index f3d87589ea32..708a82af3930 100644 --- a/clients/client-cost-optimization-hub/src/CostOptimizationHubClient.ts +++ b/clients/client-cost-optimization-hub/src/CostOptimizationHubClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -110,11 +110,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-cost-optimization-hub/src/runtimeConfig.browser.ts b/clients/client-cost-optimization-hub/src/runtimeConfig.browser.ts index 4dacf95770ed..ed9963df4f97 100644 --- a/clients/client-cost-optimization-hub/src/runtimeConfig.browser.ts +++ b/clients/client-cost-optimization-hub/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CostOptimizationHubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-cost-optimization-hub/src/runtimeConfig.ts b/clients/client-cost-optimization-hub/src/runtimeConfig.ts index 9501790ab8f4..9593611d88bb 100644 --- a/clients/client-cost-optimization-hub/src/runtimeConfig.ts +++ b/clients/client-cost-optimization-hub/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CostOptimizationHubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-customer-profiles/package.json b/clients/client-customer-profiles/package.json index 3d65f0c73c63..efc019c8566c 100644 --- a/clients/client-customer-profiles/package.json +++ b/clients/client-customer-profiles/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-customer-profiles/src/CustomerProfilesClient.ts b/clients/client-customer-profiles/src/CustomerProfilesClient.ts index 409b0f79d82b..183849a5399f 100644 --- a/clients/client-customer-profiles/src/CustomerProfilesClient.ts +++ b/clients/client-customer-profiles/src/CustomerProfilesClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -299,11 +299,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-customer-profiles/src/runtimeConfig.browser.ts b/clients/client-customer-profiles/src/runtimeConfig.browser.ts index 2d62e66f3665..968b02338ba4 100644 --- a/clients/client-customer-profiles/src/runtimeConfig.browser.ts +++ b/clients/client-customer-profiles/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: CustomerProfilesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-customer-profiles/src/runtimeConfig.ts b/clients/client-customer-profiles/src/runtimeConfig.ts index 979c13358458..05e7c494c14e 100644 --- a/clients/client-customer-profiles/src/runtimeConfig.ts +++ b/clients/client-customer-profiles/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: CustomerProfilesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-data-pipeline/package.json b/clients/client-data-pipeline/package.json index 4f5a9754c701..3fd9237cda7f 100644 --- a/clients/client-data-pipeline/package.json +++ b/clients/client-data-pipeline/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-data-pipeline/src/DataPipelineClient.ts b/clients/client-data-pipeline/src/DataPipelineClient.ts index 1dbf4d516cfb..c6e400598b8c 100644 --- a/clients/client-data-pipeline/src/DataPipelineClient.ts +++ b/clients/client-data-pipeline/src/DataPipelineClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -146,11 +146,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-data-pipeline/src/runtimeConfig.browser.ts b/clients/client-data-pipeline/src/runtimeConfig.browser.ts index fceface79811..84d6aa349ffe 100644 --- a/clients/client-data-pipeline/src/runtimeConfig.browser.ts +++ b/clients/client-data-pipeline/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DataPipelineClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-data-pipeline/src/runtimeConfig.ts b/clients/client-data-pipeline/src/runtimeConfig.ts index 4abfdf3ed095..40cbdd2b9050 100644 --- a/clients/client-data-pipeline/src/runtimeConfig.ts +++ b/clients/client-data-pipeline/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DataPipelineClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-database-migration-service/package.json b/clients/client-database-migration-service/package.json index 9f004b0b6f86..28e557c88d88 100644 --- a/clients/client-database-migration-service/package.json +++ b/clients/client-database-migration-service/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-database-migration-service/src/DatabaseMigrationServiceClient.ts b/clients/client-database-migration-service/src/DatabaseMigrationServiceClient.ts index 24eca1c96244..42b6f4f1bbaa 100644 --- a/clients/client-database-migration-service/src/DatabaseMigrationServiceClient.ts +++ b/clients/client-database-migration-service/src/DatabaseMigrationServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -659,11 +659,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-database-migration-service/src/runtimeConfig.browser.ts b/clients/client-database-migration-service/src/runtimeConfig.browser.ts index 97b822618902..4aedd5be9f5b 100644 --- a/clients/client-database-migration-service/src/runtimeConfig.browser.ts +++ b/clients/client-database-migration-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DatabaseMigrationServiceClientConfig) = defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-database-migration-service/src/runtimeConfig.ts b/clients/client-database-migration-service/src/runtimeConfig.ts index 6eb375abb414..47f52e4d190b 100644 --- a/clients/client-database-migration-service/src/runtimeConfig.ts +++ b/clients/client-database-migration-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DatabaseMigrationServiceClientConfig) = defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-databrew/package.json b/clients/client-databrew/package.json index 70affa29eb26..2376b6d232a8 100644 --- a/clients/client-databrew/package.json +++ b/clients/client-databrew/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-databrew/src/DataBrewClient.ts b/clients/client-databrew/src/DataBrewClient.ts index ec034e3bcdab..603e66bbda66 100644 --- a/clients/client-databrew/src/DataBrewClient.ts +++ b/clients/client-databrew/src/DataBrewClient.ts @@ -28,7 +28,7 @@ import { RetryInputConfig, RetryResolvedConfig, } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -230,11 +230,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-databrew/src/runtimeConfig.browser.ts b/clients/client-databrew/src/runtimeConfig.browser.ts index 187c137c3d3f..bffa6ab4146c 100644 --- a/clients/client-databrew/src/runtimeConfig.browser.ts +++ b/clients/client-databrew/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DataBrewClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-databrew/src/runtimeConfig.ts b/clients/client-databrew/src/runtimeConfig.ts index 05a48cab3ee1..15ef89b66846 100644 --- a/clients/client-databrew/src/runtimeConfig.ts +++ b/clients/client-databrew/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DataBrewClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-dataexchange/package.json b/clients/client-dataexchange/package.json index d5a518a7820f..e49b888f6364 100644 --- a/clients/client-dataexchange/package.json +++ b/clients/client-dataexchange/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-dataexchange/src/DataExchangeClient.ts b/clients/client-dataexchange/src/DataExchangeClient.ts index d4d722c7f6ed..cd9995607823 100644 --- a/clients/client-dataexchange/src/DataExchangeClient.ts +++ b/clients/client-dataexchange/src/DataExchangeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -176,11 +176,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-dataexchange/src/runtimeConfig.browser.ts b/clients/client-dataexchange/src/runtimeConfig.browser.ts index 4fc53c1c8b9e..58c50faada74 100644 --- a/clients/client-dataexchange/src/runtimeConfig.browser.ts +++ b/clients/client-dataexchange/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DataExchangeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-dataexchange/src/runtimeConfig.ts b/clients/client-dataexchange/src/runtimeConfig.ts index 8fef02122354..29c9706d442b 100644 --- a/clients/client-dataexchange/src/runtimeConfig.ts +++ b/clients/client-dataexchange/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DataExchangeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-datasync/package.json b/clients/client-datasync/package.json index 7f5ea175a266..9e5fc5d97a18 100644 --- a/clients/client-datasync/package.json +++ b/clients/client-datasync/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-datasync/src/DataSyncClient.ts b/clients/client-datasync/src/DataSyncClient.ts index f0fdbced2b21..4808672ecd67 100644 --- a/clients/client-datasync/src/DataSyncClient.ts +++ b/clients/client-datasync/src/DataSyncClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -344,11 +344,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-datasync/src/runtimeConfig.browser.ts b/clients/client-datasync/src/runtimeConfig.browser.ts index 4552e1be8d2f..c089eeeb3cd2 100644 --- a/clients/client-datasync/src/runtimeConfig.browser.ts +++ b/clients/client-datasync/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DataSyncClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-datasync/src/runtimeConfig.ts b/clients/client-datasync/src/runtimeConfig.ts index 55f76ef85872..97930d0d73b8 100644 --- a/clients/client-datasync/src/runtimeConfig.ts +++ b/clients/client-datasync/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DataSyncClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-datazone/package.json b/clients/client-datazone/package.json index 0132ff64758a..2e0c7085b559 100644 --- a/clients/client-datazone/package.json +++ b/clients/client-datazone/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-datazone/src/DataZoneClient.ts b/clients/client-datazone/src/DataZoneClient.ts index 451f0f2bd500..bd4256738df8 100644 --- a/clients/client-datazone/src/DataZoneClient.ts +++ b/clients/client-datazone/src/DataZoneClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -485,11 +485,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-datazone/src/runtimeConfig.browser.ts b/clients/client-datazone/src/runtimeConfig.browser.ts index 6d0b4d92fa33..53bb3b5f8b11 100644 --- a/clients/client-datazone/src/runtimeConfig.browser.ts +++ b/clients/client-datazone/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DataZoneClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-datazone/src/runtimeConfig.ts b/clients/client-datazone/src/runtimeConfig.ts index 07cee5c01a18..faa1be8bcc92 100644 --- a/clients/client-datazone/src/runtimeConfig.ts +++ b/clients/client-datazone/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DataZoneClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-dax/package.json b/clients/client-dax/package.json index 5fe50b98c4d2..da4f1e831b90 100644 --- a/clients/client-dax/package.json +++ b/clients/client-dax/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-dax/src/DAXClient.ts b/clients/client-dax/src/DAXClient.ts index 524fd39c9d7f..5908b36e2967 100644 --- a/clients/client-dax/src/DAXClient.ts +++ b/clients/client-dax/src/DAXClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -164,11 +164,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-dax/src/runtimeConfig.browser.ts b/clients/client-dax/src/runtimeConfig.browser.ts index 8ff5a4d2b6f2..58deb12c08d0 100644 --- a/clients/client-dax/src/runtimeConfig.browser.ts +++ b/clients/client-dax/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DAXClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-dax/src/runtimeConfig.ts b/clients/client-dax/src/runtimeConfig.ts index 7a339fca1cb5..4edda355526f 100644 --- a/clients/client-dax/src/runtimeConfig.ts +++ b/clients/client-dax/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DAXClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-detective/package.json b/clients/client-detective/package.json index 4e543dcb5233..923ebae07938 100644 --- a/clients/client-detective/package.json +++ b/clients/client-detective/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-detective/src/DetectiveClient.ts b/clients/client-detective/src/DetectiveClient.ts index 09751f66f551..1c4727298b47 100644 --- a/clients/client-detective/src/DetectiveClient.ts +++ b/clients/client-detective/src/DetectiveClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -203,11 +203,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-detective/src/runtimeConfig.browser.ts b/clients/client-detective/src/runtimeConfig.browser.ts index 49f0d637f1c5..3d49b086ea9c 100644 --- a/clients/client-detective/src/runtimeConfig.browser.ts +++ b/clients/client-detective/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DetectiveClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-detective/src/runtimeConfig.ts b/clients/client-detective/src/runtimeConfig.ts index e2b1fddc7e3c..ac36b7590654 100644 --- a/clients/client-detective/src/runtimeConfig.ts +++ b/clients/client-detective/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DetectiveClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-device-farm/package.json b/clients/client-device-farm/package.json index 8d627a848e96..c75a4d1dde0b 100644 --- a/clients/client-device-farm/package.json +++ b/clients/client-device-farm/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-device-farm/src/DeviceFarmClient.ts b/clients/client-device-farm/src/DeviceFarmClient.ts index 17b89fd081fb..82f7dbaf15bb 100644 --- a/clients/client-device-farm/src/DeviceFarmClient.ts +++ b/clients/client-device-farm/src/DeviceFarmClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -404,11 +404,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-device-farm/src/runtimeConfig.browser.ts b/clients/client-device-farm/src/runtimeConfig.browser.ts index ee3428c7691e..5dde6fbf88f3 100644 --- a/clients/client-device-farm/src/runtimeConfig.browser.ts +++ b/clients/client-device-farm/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DeviceFarmClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-device-farm/src/runtimeConfig.ts b/clients/client-device-farm/src/runtimeConfig.ts index e6621d4cb217..31b204b978d0 100644 --- a/clients/client-device-farm/src/runtimeConfig.ts +++ b/clients/client-device-farm/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DeviceFarmClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-devops-guru/package.json b/clients/client-devops-guru/package.json index addd05f5195e..502b62901218 100644 --- a/clients/client-devops-guru/package.json +++ b/clients/client-devops-guru/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-devops-guru/src/DevOpsGuruClient.ts b/clients/client-devops-guru/src/DevOpsGuruClient.ts index bd61df5cd771..eab6970d2e25 100644 --- a/clients/client-devops-guru/src/DevOpsGuruClient.ts +++ b/clients/client-devops-guru/src/DevOpsGuruClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -236,11 +236,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-devops-guru/src/runtimeConfig.browser.ts b/clients/client-devops-guru/src/runtimeConfig.browser.ts index 840cb605844b..dcd587125f05 100644 --- a/clients/client-devops-guru/src/runtimeConfig.browser.ts +++ b/clients/client-devops-guru/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DevOpsGuruClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-devops-guru/src/runtimeConfig.ts b/clients/client-devops-guru/src/runtimeConfig.ts index 9e7211134dce..ffcdeb348d14 100644 --- a/clients/client-devops-guru/src/runtimeConfig.ts +++ b/clients/client-devops-guru/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DevOpsGuruClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-direct-connect/package.json b/clients/client-direct-connect/package.json index 2e3dba9a3154..cc3a70a877b1 100644 --- a/clients/client-direct-connect/package.json +++ b/clients/client-direct-connect/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-direct-connect/src/DirectConnectClient.ts b/clients/client-direct-connect/src/DirectConnectClient.ts index 3053f100f76f..b7a00a43df7c 100644 --- a/clients/client-direct-connect/src/DirectConnectClient.ts +++ b/clients/client-direct-connect/src/DirectConnectClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -401,11 +401,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-direct-connect/src/runtimeConfig.browser.ts b/clients/client-direct-connect/src/runtimeConfig.browser.ts index 8487d786979f..b6fa2630c9a7 100644 --- a/clients/client-direct-connect/src/runtimeConfig.browser.ts +++ b/clients/client-direct-connect/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DirectConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-direct-connect/src/runtimeConfig.ts b/clients/client-direct-connect/src/runtimeConfig.ts index 573ba5794974..f912e05e152d 100644 --- a/clients/client-direct-connect/src/runtimeConfig.ts +++ b/clients/client-direct-connect/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DirectConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-directory-service/package.json b/clients/client-directory-service/package.json index aab1b7c7183d..5420c186d69b 100644 --- a/clients/client-directory-service/package.json +++ b/clients/client-directory-service/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-directory-service/src/DirectoryServiceClient.ts b/clients/client-directory-service/src/DirectoryServiceClient.ts index a14f4bc257d8..80348be069aa 100644 --- a/clients/client-directory-service/src/DirectoryServiceClient.ts +++ b/clients/client-directory-service/src/DirectoryServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -368,11 +368,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-directory-service/src/runtimeConfig.browser.ts b/clients/client-directory-service/src/runtimeConfig.browser.ts index b6bc9fc73adf..e341063e4c6f 100644 --- a/clients/client-directory-service/src/runtimeConfig.browser.ts +++ b/clients/client-directory-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DirectoryServiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-directory-service/src/runtimeConfig.ts b/clients/client-directory-service/src/runtimeConfig.ts index 48645cd44d85..87a8acffbb28 100644 --- a/clients/client-directory-service/src/runtimeConfig.ts +++ b/clients/client-directory-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DirectoryServiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-dlm/package.json b/clients/client-dlm/package.json index 8743ce8f2be4..be1cec6b1730 100644 --- a/clients/client-dlm/package.json +++ b/clients/client-dlm/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-dlm/src/DLMClient.ts b/clients/client-dlm/src/DLMClient.ts index d253b9dc9c47..13d78db06ebc 100644 --- a/clients/client-dlm/src/DLMClient.ts +++ b/clients/client-dlm/src/DLMClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -116,11 +116,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-dlm/src/runtimeConfig.browser.ts b/clients/client-dlm/src/runtimeConfig.browser.ts index fd9b7ecd2d11..0c31baa16d1d 100644 --- a/clients/client-dlm/src/runtimeConfig.browser.ts +++ b/clients/client-dlm/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DLMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-dlm/src/runtimeConfig.ts b/clients/client-dlm/src/runtimeConfig.ts index 070395c7ddc7..fc6bc6e24a24 100644 --- a/clients/client-dlm/src/runtimeConfig.ts +++ b/clients/client-dlm/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DLMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-docdb-elastic/package.json b/clients/client-docdb-elastic/package.json index 61e70f79cb8f..b2bd2e67f89e 100644 --- a/clients/client-docdb-elastic/package.json +++ b/clients/client-docdb-elastic/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-docdb-elastic/src/DocDBElasticClient.ts b/clients/client-docdb-elastic/src/DocDBElasticClient.ts index bf9a24dafd33..7a7085188906 100644 --- a/clients/client-docdb-elastic/src/DocDBElasticClient.ts +++ b/clients/client-docdb-elastic/src/DocDBElasticClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -131,11 +131,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-docdb-elastic/src/runtimeConfig.browser.ts b/clients/client-docdb-elastic/src/runtimeConfig.browser.ts index 5fc8bef65a4d..3986a47ec49e 100644 --- a/clients/client-docdb-elastic/src/runtimeConfig.browser.ts +++ b/clients/client-docdb-elastic/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DocDBElasticClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-docdb-elastic/src/runtimeConfig.ts b/clients/client-docdb-elastic/src/runtimeConfig.ts index 534fe7bf76f2..63434647ed60 100644 --- a/clients/client-docdb-elastic/src/runtimeConfig.ts +++ b/clients/client-docdb-elastic/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DocDBElasticClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-docdb/package.json b/clients/client-docdb/package.json index cb004b6bb74d..bb9da1c1345f 100644 --- a/clients/client-docdb/package.json +++ b/clients/client-docdb/package.json @@ -33,32 +33,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-docdb/src/DocDBClient.ts b/clients/client-docdb/src/DocDBClient.ts index 6a67137ad44d..0f7239d429d8 100644 --- a/clients/client-docdb/src/DocDBClient.ts +++ b/clients/client-docdb/src/DocDBClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -356,11 +356,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-docdb/src/runtimeConfig.browser.ts b/clients/client-docdb/src/runtimeConfig.browser.ts index 39feaaf6cdec..1af36e06114b 100644 --- a/clients/client-docdb/src/runtimeConfig.browser.ts +++ b/clients/client-docdb/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DocDBClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-docdb/src/runtimeConfig.ts b/clients/client-docdb/src/runtimeConfig.ts index aa6aa65769c7..1ee59204da23 100644 --- a/clients/client-docdb/src/runtimeConfig.ts +++ b/clients/client-docdb/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DocDBClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-drs/package.json b/clients/client-drs/package.json index 68087a7d332c..8af524c8d1f1 100644 --- a/clients/client-drs/package.json +++ b/clients/client-drs/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-drs/src/DrsClient.ts b/clients/client-drs/src/DrsClient.ts index 510b762a556a..b27db54a53e7 100644 --- a/clients/client-drs/src/DrsClient.ts +++ b/clients/client-drs/src/DrsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -335,11 +335,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-drs/src/runtimeConfig.browser.ts b/clients/client-drs/src/runtimeConfig.browser.ts index 42d0f457890a..26421479de01 100644 --- a/clients/client-drs/src/runtimeConfig.browser.ts +++ b/clients/client-drs/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DrsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-drs/src/runtimeConfig.ts b/clients/client-drs/src/runtimeConfig.ts index 4edd3d8c748a..ddb104cb09bb 100644 --- a/clients/client-drs/src/runtimeConfig.ts +++ b/clients/client-drs/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DrsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-dynamodb-streams/package.json b/clients/client-dynamodb-streams/package.json index 33461ccb6f41..800ac4ae711c 100644 --- a/clients/client-dynamodb-streams/package.json +++ b/clients/client-dynamodb-streams/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-dynamodb-streams/src/DynamoDBStreamsClient.ts b/clients/client-dynamodb-streams/src/DynamoDBStreamsClient.ts index 83ede23f2858..51c110d08980 100644 --- a/clients/client-dynamodb-streams/src/DynamoDBStreamsClient.ts +++ b/clients/client-dynamodb-streams/src/DynamoDBStreamsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -89,11 +89,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-dynamodb-streams/src/runtimeConfig.browser.ts b/clients/client-dynamodb-streams/src/runtimeConfig.browser.ts index c74b0a0cab8c..73201118de64 100644 --- a/clients/client-dynamodb-streams/src/runtimeConfig.browser.ts +++ b/clients/client-dynamodb-streams/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: DynamoDBStreamsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-dynamodb-streams/src/runtimeConfig.ts b/clients/client-dynamodb-streams/src/runtimeConfig.ts index 86d453e9d8c7..18fd38a16f89 100644 --- a/clients/client-dynamodb-streams/src/runtimeConfig.ts +++ b/clients/client-dynamodb-streams/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: DynamoDBStreamsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-dynamodb/package.json b/clients/client-dynamodb/package.json index 2ebb4359d22c..dde0e6d4ec4a 100644 --- a/clients/client-dynamodb/package.json +++ b/clients/client-dynamodb/package.json @@ -33,32 +33,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-dynamodb/src/DynamoDBClient.ts b/clients/client-dynamodb/src/DynamoDBClient.ts index af2e4cd1f5fd..aac132486592 100644 --- a/clients/client-dynamodb/src/DynamoDBClient.ts +++ b/clients/client-dynamodb/src/DynamoDBClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -302,11 +302,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-dynamodb/src/runtimeConfig.browser.ts b/clients/client-dynamodb/src/runtimeConfig.browser.ts index 3e951efd2d2b..f99d2dd7bc5a 100644 --- a/clients/client-dynamodb/src/runtimeConfig.browser.ts +++ b/clients/client-dynamodb/src/runtimeConfig.browser.ts @@ -35,7 +35,7 @@ export const getRuntimeConfig = (config: DynamoDBClientConfig) => { endpointDiscoveryEnabledProvider: config?.endpointDiscoveryEnabledProvider ?? (() => Promise.resolve(undefined)), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-dynamodb/src/runtimeConfig.ts b/clients/client-dynamodb/src/runtimeConfig.ts index f18772e7634b..6e156d1ed12f 100644 --- a/clients/client-dynamodb/src/runtimeConfig.ts +++ b/clients/client-dynamodb/src/runtimeConfig.ts @@ -47,7 +47,7 @@ export const getRuntimeConfig = (config: DynamoDBClientConfig) => { config?.endpointDiscoveryEnabledProvider ?? loadNodeConfig(NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ebs/package.json b/clients/client-ebs/package.json index f72b06cc3ca7..f2b832eb4a5b 100644 --- a/clients/client-ebs/package.json +++ b/clients/client-ebs/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-ebs/src/EBSClient.ts b/clients/client-ebs/src/EBSClient.ts index ef7ff71b594c..94f53bf999c7 100644 --- a/clients/client-ebs/src/EBSClient.ts +++ b/clients/client-ebs/src/EBSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -96,11 +96,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ebs/src/runtimeConfig.browser.ts b/clients/client-ebs/src/runtimeConfig.browser.ts index bc370db40cc3..84aa6920df5f 100644 --- a/clients/client-ebs/src/runtimeConfig.browser.ts +++ b/clients/client-ebs/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EBSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ebs/src/runtimeConfig.ts b/clients/client-ebs/src/runtimeConfig.ts index e5e5fb708cda..97f05e74d47b 100644 --- a/clients/client-ebs/src/runtimeConfig.ts +++ b/clients/client-ebs/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EBSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ec2-instance-connect/package.json b/clients/client-ec2-instance-connect/package.json index ad76f4dbe2f0..ecdc8e664e7b 100644 --- a/clients/client-ec2-instance-connect/package.json +++ b/clients/client-ec2-instance-connect/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts b/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts index cd171e1882aa..ab1c4c5dd1dd 100644 --- a/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts +++ b/clients/client-ec2-instance-connect/src/EC2InstanceConnectClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -82,11 +82,11 @@ export type ServiceOutputTypes = SendSSHPublicKeyCommandOutput | SendSerialConso /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ec2-instance-connect/src/runtimeConfig.browser.ts b/clients/client-ec2-instance-connect/src/runtimeConfig.browser.ts index cfd51238eef1..3aa8bda3fd9f 100644 --- a/clients/client-ec2-instance-connect/src/runtimeConfig.browser.ts +++ b/clients/client-ec2-instance-connect/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EC2InstanceConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ec2-instance-connect/src/runtimeConfig.ts b/clients/client-ec2-instance-connect/src/runtimeConfig.ts index 977313c2a841..218eefd89d00 100644 --- a/clients/client-ec2-instance-connect/src/runtimeConfig.ts +++ b/clients/client-ec2-instance-connect/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EC2InstanceConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ec2/package.json b/clients/client-ec2/package.json index dd2d21048a26..cc0244ee3d0d 100644 --- a/clients/client-ec2/package.json +++ b/clients/client-ec2/package.json @@ -33,32 +33,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-ec2/src/EC2Client.ts b/clients/client-ec2/src/EC2Client.ts index 727cdb325eaa..d8e86ea23cd6 100644 --- a/clients/client-ec2/src/EC2Client.ts +++ b/clients/client-ec2/src/EC2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -3386,11 +3386,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ec2/src/runtimeConfig.browser.ts b/clients/client-ec2/src/runtimeConfig.browser.ts index 9a11e84c604d..aef092c6568c 100644 --- a/clients/client-ec2/src/runtimeConfig.browser.ts +++ b/clients/client-ec2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EC2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ec2/src/runtimeConfig.ts b/clients/client-ec2/src/runtimeConfig.ts index 48cb52ff47b1..b935f9f64428 100644 --- a/clients/client-ec2/src/runtimeConfig.ts +++ b/clients/client-ec2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EC2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ecr-public/package.json b/clients/client-ecr-public/package.json index 0adb8dd0bc26..f3649de97882 100644 --- a/clients/client-ecr-public/package.json +++ b/clients/client-ecr-public/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-ecr-public/src/ECRPUBLICClient.ts b/clients/client-ecr-public/src/ECRPUBLICClient.ts index 2c9ce9aa1bba..2dedd61f751c 100644 --- a/clients/client-ecr-public/src/ECRPUBLICClient.ts +++ b/clients/client-ecr-public/src/ECRPUBLICClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -185,11 +185,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ecr-public/src/runtimeConfig.browser.ts b/clients/client-ecr-public/src/runtimeConfig.browser.ts index b9f6edf1c92c..c5d9b4bb1b8e 100644 --- a/clients/client-ecr-public/src/runtimeConfig.browser.ts +++ b/clients/client-ecr-public/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ECRPUBLICClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ecr-public/src/runtimeConfig.ts b/clients/client-ecr-public/src/runtimeConfig.ts index f3244a4625b3..2f5b0c60ff25 100644 --- a/clients/client-ecr-public/src/runtimeConfig.ts +++ b/clients/client-ecr-public/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ECRPUBLICClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ecr/package.json b/clients/client-ecr/package.json index 6787a9318816..45526ba6f3b8 100644 --- a/clients/client-ecr/package.json +++ b/clients/client-ecr/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-ecr/src/ECRClient.ts b/clients/client-ecr/src/ECRClient.ts index ba4d143d09d9..0af42a7af20f 100644 --- a/clients/client-ecr/src/ECRClient.ts +++ b/clients/client-ecr/src/ECRClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -287,11 +287,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ecr/src/runtimeConfig.browser.ts b/clients/client-ecr/src/runtimeConfig.browser.ts index fe3aea57d236..6dc9cec787b5 100644 --- a/clients/client-ecr/src/runtimeConfig.browser.ts +++ b/clients/client-ecr/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ECRClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ecr/src/runtimeConfig.ts b/clients/client-ecr/src/runtimeConfig.ts index 25bab2d214c7..5a0fb8abdaed 100644 --- a/clients/client-ecr/src/runtimeConfig.ts +++ b/clients/client-ecr/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ECRClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ecs/package.json b/clients/client-ecs/package.json index 1ca4ba11df95..985e033beaee 100644 --- a/clients/client-ecs/package.json +++ b/clients/client-ecs/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-ecs/src/ECSClient.ts b/clients/client-ecs/src/ECSClient.ts index f7d581e5a5fb..660ccf91259c 100644 --- a/clients/client-ecs/src/ECSClient.ts +++ b/clients/client-ecs/src/ECSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -332,11 +332,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ecs/src/runtimeConfig.browser.ts b/clients/client-ecs/src/runtimeConfig.browser.ts index 5ab5d0ce3e11..6026e415cb9f 100644 --- a/clients/client-ecs/src/runtimeConfig.browser.ts +++ b/clients/client-ecs/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ECSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ecs/src/runtimeConfig.ts b/clients/client-ecs/src/runtimeConfig.ts index 1d0cdd17961d..8ab6854b3807 100644 --- a/clients/client-ecs/src/runtimeConfig.ts +++ b/clients/client-ecs/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ECSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-efs/package.json b/clients/client-efs/package.json index d942098b9ef4..87cd9eda2119 100644 --- a/clients/client-efs/package.json +++ b/clients/client-efs/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-efs/src/EFSClient.ts b/clients/client-efs/src/EFSClient.ts index da1ee20865c3..ece53ea56870 100644 --- a/clients/client-efs/src/EFSClient.ts +++ b/clients/client-efs/src/EFSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -224,11 +224,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-efs/src/runtimeConfig.browser.ts b/clients/client-efs/src/runtimeConfig.browser.ts index 3b2cf3a0e7b5..57bc50a82e80 100644 --- a/clients/client-efs/src/runtimeConfig.browser.ts +++ b/clients/client-efs/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EFSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-efs/src/runtimeConfig.ts b/clients/client-efs/src/runtimeConfig.ts index 7ce2a2bdf2d0..6082c17b686b 100644 --- a/clients/client-efs/src/runtimeConfig.ts +++ b/clients/client-efs/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EFSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-eks-auth/package.json b/clients/client-eks-auth/package.json index 97955d2f4b70..8fdc5f4f6284 100644 --- a/clients/client-eks-auth/package.json +++ b/clients/client-eks-auth/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-eks-auth/src/EKSAuthClient.ts b/clients/client-eks-auth/src/EKSAuthClient.ts index 48e4b1d3717d..95b71a90789c 100644 --- a/clients/client-eks-auth/src/EKSAuthClient.ts +++ b/clients/client-eks-auth/src/EKSAuthClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -81,11 +81,11 @@ export type ServiceOutputTypes = AssumeRoleForPodIdentityCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-eks-auth/src/runtimeConfig.browser.ts b/clients/client-eks-auth/src/runtimeConfig.browser.ts index 6b1add3208bd..083ce64a7021 100644 --- a/clients/client-eks-auth/src/runtimeConfig.browser.ts +++ b/clients/client-eks-auth/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EKSAuthClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-eks-auth/src/runtimeConfig.ts b/clients/client-eks-auth/src/runtimeConfig.ts index d22f19a7bfe1..61a191c85939 100644 --- a/clients/client-eks-auth/src/runtimeConfig.ts +++ b/clients/client-eks-auth/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EKSAuthClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-eks/package.json b/clients/client-eks/package.json index 8591be860236..1b017c8b128c 100644 --- a/clients/client-eks/package.json +++ b/clients/client-eks/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-eks/src/EKSClient.ts b/clients/client-eks/src/EKSClient.ts index 644d232450b6..2358ab22a69f 100644 --- a/clients/client-eks/src/EKSClient.ts +++ b/clients/client-eks/src/EKSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -335,11 +335,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-eks/src/runtimeConfig.browser.ts b/clients/client-eks/src/runtimeConfig.browser.ts index 5acf6148b8ca..68987be051fd 100644 --- a/clients/client-eks/src/runtimeConfig.browser.ts +++ b/clients/client-eks/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EKSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-eks/src/runtimeConfig.ts b/clients/client-eks/src/runtimeConfig.ts index 842de7b486d1..d87cbf9092b2 100644 --- a/clients/client-eks/src/runtimeConfig.ts +++ b/clients/client-eks/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EKSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-elastic-beanstalk/package.json b/clients/client-elastic-beanstalk/package.json index d8e154204354..08958b0939cf 100644 --- a/clients/client-elastic-beanstalk/package.json +++ b/clients/client-elastic-beanstalk/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-elastic-beanstalk/src/ElasticBeanstalkClient.ts b/clients/client-elastic-beanstalk/src/ElasticBeanstalkClient.ts index 88c10a8cfa3f..9f3c01993747 100644 --- a/clients/client-elastic-beanstalk/src/ElasticBeanstalkClient.ts +++ b/clients/client-elastic-beanstalk/src/ElasticBeanstalkClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -335,11 +335,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-elastic-beanstalk/src/runtimeConfig.browser.ts b/clients/client-elastic-beanstalk/src/runtimeConfig.browser.ts index a2d40aecccda..1e0f685819f9 100644 --- a/clients/client-elastic-beanstalk/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-beanstalk/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ElasticBeanstalkClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-elastic-beanstalk/src/runtimeConfig.ts b/clients/client-elastic-beanstalk/src/runtimeConfig.ts index 698cc5429546..63ffff603303 100644 --- a/clients/client-elastic-beanstalk/src/runtimeConfig.ts +++ b/clients/client-elastic-beanstalk/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ElasticBeanstalkClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-elastic-inference/package.json b/clients/client-elastic-inference/package.json index a8782ec6c35c..ede62395d7e9 100644 --- a/clients/client-elastic-inference/package.json +++ b/clients/client-elastic-inference/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-elastic-inference/src/ElasticInferenceClient.ts b/clients/client-elastic-inference/src/ElasticInferenceClient.ts index 5df903b4e353..21b0f7ddf9b0 100644 --- a/clients/client-elastic-inference/src/ElasticInferenceClient.ts +++ b/clients/client-elastic-inference/src/ElasticInferenceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -107,11 +107,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-elastic-inference/src/runtimeConfig.browser.ts b/clients/client-elastic-inference/src/runtimeConfig.browser.ts index ac345cb94679..577afe10c828 100644 --- a/clients/client-elastic-inference/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-inference/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ElasticInferenceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-elastic-inference/src/runtimeConfig.ts b/clients/client-elastic-inference/src/runtimeConfig.ts index c785498e02a6..7bfa9a07b413 100644 --- a/clients/client-elastic-inference/src/runtimeConfig.ts +++ b/clients/client-elastic-inference/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ElasticInferenceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-elastic-load-balancing-v2/package.json b/clients/client-elastic-load-balancing-v2/package.json index 1cfeedec75f9..3e01a49461d9 100644 --- a/clients/client-elastic-load-balancing-v2/package.json +++ b/clients/client-elastic-load-balancing-v2/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2Client.ts b/clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2Client.ts index 633460cdb266..5c29c95d98c7 100644 --- a/clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2Client.ts +++ b/clients/client-elastic-load-balancing-v2/src/ElasticLoadBalancingV2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -266,11 +266,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-elastic-load-balancing-v2/src/runtimeConfig.browser.ts b/clients/client-elastic-load-balancing-v2/src/runtimeConfig.browser.ts index dcd404fc82b3..9e5ba46bdf2a 100644 --- a/clients/client-elastic-load-balancing-v2/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-load-balancing-v2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ElasticLoadBalancingV2ClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-elastic-load-balancing-v2/src/runtimeConfig.ts b/clients/client-elastic-load-balancing-v2/src/runtimeConfig.ts index 653236830a10..ceaa760e0716 100644 --- a/clients/client-elastic-load-balancing-v2/src/runtimeConfig.ts +++ b/clients/client-elastic-load-balancing-v2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ElasticLoadBalancingV2ClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-elastic-load-balancing/package.json b/clients/client-elastic-load-balancing/package.json index aea3c3c35a1e..8b8cac90e855 100644 --- a/clients/client-elastic-load-balancing/package.json +++ b/clients/client-elastic-load-balancing/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-elastic-load-balancing/src/ElasticLoadBalancingClient.ts b/clients/client-elastic-load-balancing/src/ElasticLoadBalancingClient.ts index af340199956c..4d5891d6e44e 100644 --- a/clients/client-elastic-load-balancing/src/ElasticLoadBalancingClient.ts +++ b/clients/client-elastic-load-balancing/src/ElasticLoadBalancingClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -236,11 +236,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-elastic-load-balancing/src/runtimeConfig.browser.ts b/clients/client-elastic-load-balancing/src/runtimeConfig.browser.ts index 7cb5835d7de2..91fed7d8c738 100644 --- a/clients/client-elastic-load-balancing/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-load-balancing/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ElasticLoadBalancingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-elastic-load-balancing/src/runtimeConfig.ts b/clients/client-elastic-load-balancing/src/runtimeConfig.ts index 54da68cb5aeb..63c591ce42fc 100644 --- a/clients/client-elastic-load-balancing/src/runtimeConfig.ts +++ b/clients/client-elastic-load-balancing/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ElasticLoadBalancingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-elastic-transcoder/package.json b/clients/client-elastic-transcoder/package.json index 9100775159a3..232186d2a3eb 100644 --- a/clients/client-elastic-transcoder/package.json +++ b/clients/client-elastic-transcoder/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-elastic-transcoder/src/ElasticTranscoderClient.ts b/clients/client-elastic-transcoder/src/ElasticTranscoderClient.ts index 4b0ef10802a3..bf6e91778998 100644 --- a/clients/client-elastic-transcoder/src/ElasticTranscoderClient.ts +++ b/clients/client-elastic-transcoder/src/ElasticTranscoderClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -134,11 +134,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-elastic-transcoder/src/runtimeConfig.browser.ts b/clients/client-elastic-transcoder/src/runtimeConfig.browser.ts index a6302391b6ca..b71d48be51b6 100644 --- a/clients/client-elastic-transcoder/src/runtimeConfig.browser.ts +++ b/clients/client-elastic-transcoder/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ElasticTranscoderClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-elastic-transcoder/src/runtimeConfig.ts b/clients/client-elastic-transcoder/src/runtimeConfig.ts index a7bd7e5c207f..cec0cc58936f 100644 --- a/clients/client-elastic-transcoder/src/runtimeConfig.ts +++ b/clients/client-elastic-transcoder/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ElasticTranscoderClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-elasticache/package.json b/clients/client-elasticache/package.json index 6daafee87b4f..184799759e8d 100644 --- a/clients/client-elasticache/package.json +++ b/clients/client-elasticache/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-elasticache/src/ElastiCacheClient.ts b/clients/client-elasticache/src/ElastiCacheClient.ts index b9b5715df163..1549f9a75706 100644 --- a/clients/client-elasticache/src/ElastiCacheClient.ts +++ b/clients/client-elasticache/src/ElastiCacheClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -461,11 +461,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-elasticache/src/runtimeConfig.browser.ts b/clients/client-elasticache/src/runtimeConfig.browser.ts index 5609b1444ffd..bd88794bd5ae 100644 --- a/clients/client-elasticache/src/runtimeConfig.browser.ts +++ b/clients/client-elasticache/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ElastiCacheClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-elasticache/src/runtimeConfig.ts b/clients/client-elasticache/src/runtimeConfig.ts index 00e1e8011cc4..9f98218cfd71 100644 --- a/clients/client-elasticache/src/runtimeConfig.ts +++ b/clients/client-elasticache/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ElastiCacheClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-elasticsearch-service/package.json b/clients/client-elasticsearch-service/package.json index 3485b35057d3..f284a6972563 100644 --- a/clients/client-elasticsearch-service/package.json +++ b/clients/client-elasticsearch-service/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-elasticsearch-service/src/ElasticsearchServiceClient.ts b/clients/client-elasticsearch-service/src/ElasticsearchServiceClient.ts index dcb4985bdee1..dc91be0e57a1 100644 --- a/clients/client-elasticsearch-service/src/ElasticsearchServiceClient.ts +++ b/clients/client-elasticsearch-service/src/ElasticsearchServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -335,11 +335,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-elasticsearch-service/src/runtimeConfig.browser.ts b/clients/client-elasticsearch-service/src/runtimeConfig.browser.ts index 97e91845ca16..0c2b7a3da5aa 100644 --- a/clients/client-elasticsearch-service/src/runtimeConfig.browser.ts +++ b/clients/client-elasticsearch-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ElasticsearchServiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-elasticsearch-service/src/runtimeConfig.ts b/clients/client-elasticsearch-service/src/runtimeConfig.ts index 4a44a48b2c3d..027c7cf68416 100644 --- a/clients/client-elasticsearch-service/src/runtimeConfig.ts +++ b/clients/client-elasticsearch-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ElasticsearchServiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-emr-containers/package.json b/clients/client-emr-containers/package.json index 7067042a9b4a..354aab734daa 100644 --- a/clients/client-emr-containers/package.json +++ b/clients/client-emr-containers/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-emr-containers/src/EMRContainersClient.ts b/clients/client-emr-containers/src/EMRContainersClient.ts index 1987b6017cde..81d0dfe07d6a 100644 --- a/clients/client-emr-containers/src/EMRContainersClient.ts +++ b/clients/client-emr-containers/src/EMRContainersClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -170,11 +170,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-emr-containers/src/runtimeConfig.browser.ts b/clients/client-emr-containers/src/runtimeConfig.browser.ts index cbd45848ca37..77750a6a89a7 100644 --- a/clients/client-emr-containers/src/runtimeConfig.browser.ts +++ b/clients/client-emr-containers/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EMRContainersClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-emr-containers/src/runtimeConfig.ts b/clients/client-emr-containers/src/runtimeConfig.ts index 9f4b7c4c1735..dc3530eb33e1 100644 --- a/clients/client-emr-containers/src/runtimeConfig.ts +++ b/clients/client-emr-containers/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EMRContainersClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-emr-serverless/package.json b/clients/client-emr-serverless/package.json index 5d990f1e0a70..be35d5e40650 100644 --- a/clients/client-emr-serverless/package.json +++ b/clients/client-emr-serverless/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-emr-serverless/src/EMRServerlessClient.ts b/clients/client-emr-serverless/src/EMRServerlessClient.ts index 082cd03f5df7..453fae3fd5a8 100644 --- a/clients/client-emr-serverless/src/EMRServerlessClient.ts +++ b/clients/client-emr-serverless/src/EMRServerlessClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -128,11 +128,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-emr-serverless/src/runtimeConfig.browser.ts b/clients/client-emr-serverless/src/runtimeConfig.browser.ts index 6c122f3f300a..eddbff129543 100644 --- a/clients/client-emr-serverless/src/runtimeConfig.browser.ts +++ b/clients/client-emr-serverless/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EMRServerlessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-emr-serverless/src/runtimeConfig.ts b/clients/client-emr-serverless/src/runtimeConfig.ts index 953c3cdf780f..b15d5609b820 100644 --- a/clients/client-emr-serverless/src/runtimeConfig.ts +++ b/clients/client-emr-serverless/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EMRServerlessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-emr/package.json b/clients/client-emr/package.json index e2ceada37cbc..b0d7a2657c9f 100644 --- a/clients/client-emr/package.json +++ b/clients/client-emr/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-emr/src/EMRClient.ts b/clients/client-emr/src/EMRClient.ts index 8438cecad496..1be7d38cc6e4 100644 --- a/clients/client-emr/src/EMRClient.ts +++ b/clients/client-emr/src/EMRClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -344,11 +344,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-emr/src/runtimeConfig.browser.ts b/clients/client-emr/src/runtimeConfig.browser.ts index 37f4aac44e86..63d7f18d5a1d 100644 --- a/clients/client-emr/src/runtimeConfig.browser.ts +++ b/clients/client-emr/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EMRClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-emr/src/runtimeConfig.ts b/clients/client-emr/src/runtimeConfig.ts index aad613dfb2a6..b650809805d4 100644 --- a/clients/client-emr/src/runtimeConfig.ts +++ b/clients/client-emr/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EMRClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-entityresolution/package.json b/clients/client-entityresolution/package.json index ef7fc4cdd804..9ad11fd11444 100644 --- a/clients/client-entityresolution/package.json +++ b/clients/client-entityresolution/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-entityresolution/src/EntityResolutionClient.ts b/clients/client-entityresolution/src/EntityResolutionClient.ts index eb8d3072013c..74034e26871c 100644 --- a/clients/client-entityresolution/src/EntityResolutionClient.ts +++ b/clients/client-entityresolution/src/EntityResolutionClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -203,11 +203,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-entityresolution/src/runtimeConfig.browser.ts b/clients/client-entityresolution/src/runtimeConfig.browser.ts index bbda7ac5c9ee..d6cc09a2a977 100644 --- a/clients/client-entityresolution/src/runtimeConfig.browser.ts +++ b/clients/client-entityresolution/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EntityResolutionClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-entityresolution/src/runtimeConfig.ts b/clients/client-entityresolution/src/runtimeConfig.ts index 45b3babeb6d8..cd82429d9de1 100644 --- a/clients/client-entityresolution/src/runtimeConfig.ts +++ b/clients/client-entityresolution/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EntityResolutionClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-eventbridge/package.json b/clients/client-eventbridge/package.json index 2531ae3a6e5f..b48f3d85d726 100644 --- a/clients/client-eventbridge/package.json +++ b/clients/client-eventbridge/package.json @@ -36,28 +36,28 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-eventbridge/src/EventBridgeClient.ts b/clients/client-eventbridge/src/EventBridgeClient.ts index 27adfc5e0310..8c301844d8ad 100644 --- a/clients/client-eventbridge/src/EventBridgeClient.ts +++ b/clients/client-eventbridge/src/EventBridgeClient.ts @@ -24,7 +24,7 @@ import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@s import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -288,11 +288,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-eventbridge/src/runtimeConfig.browser.ts b/clients/client-eventbridge/src/runtimeConfig.browser.ts index 1b8fa3ba9585..64ed179af7b4 100644 --- a/clients/client-eventbridge/src/runtimeConfig.browser.ts +++ b/clients/client-eventbridge/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EventBridgeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-eventbridge/src/runtimeConfig.ts b/clients/client-eventbridge/src/runtimeConfig.ts index 38684bdfbf1b..cfc6e176da83 100644 --- a/clients/client-eventbridge/src/runtimeConfig.ts +++ b/clients/client-eventbridge/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EventBridgeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-evidently/package.json b/clients/client-evidently/package.json index 5b936ba2f0d7..c4d723ac54d5 100644 --- a/clients/client-evidently/package.json +++ b/clients/client-evidently/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-evidently/src/EvidentlyClient.ts b/clients/client-evidently/src/EvidentlyClient.ts index ea012e04f290..ddcb18734dd1 100644 --- a/clients/client-evidently/src/EvidentlyClient.ts +++ b/clients/client-evidently/src/EvidentlyClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -206,11 +206,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-evidently/src/runtimeConfig.browser.ts b/clients/client-evidently/src/runtimeConfig.browser.ts index b6638f59b7b1..7fc91fdf63f6 100644 --- a/clients/client-evidently/src/runtimeConfig.browser.ts +++ b/clients/client-evidently/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: EvidentlyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-evidently/src/runtimeConfig.ts b/clients/client-evidently/src/runtimeConfig.ts index c65a9daab32f..2983a5300dd9 100644 --- a/clients/client-evidently/src/runtimeConfig.ts +++ b/clients/client-evidently/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: EvidentlyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-finspace-data/package.json b/clients/client-finspace-data/package.json index c2cea056a4f2..4235ef054195 100644 --- a/clients/client-finspace-data/package.json +++ b/clients/client-finspace-data/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-finspace-data/src/FinspaceDataClient.ts b/clients/client-finspace-data/src/FinspaceDataClient.ts index 68e59fac832e..cb6acbac2fd6 100644 --- a/clients/client-finspace-data/src/FinspaceDataClient.ts +++ b/clients/client-finspace-data/src/FinspaceDataClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -200,11 +200,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-finspace-data/src/runtimeConfig.browser.ts b/clients/client-finspace-data/src/runtimeConfig.browser.ts index b041810a1fca..b3a484cb3841 100644 --- a/clients/client-finspace-data/src/runtimeConfig.browser.ts +++ b/clients/client-finspace-data/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: FinspaceDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-finspace-data/src/runtimeConfig.ts b/clients/client-finspace-data/src/runtimeConfig.ts index bb048a9e66fc..3b09e0976b5d 100644 --- a/clients/client-finspace-data/src/runtimeConfig.ts +++ b/clients/client-finspace-data/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: FinspaceDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-finspace/package.json b/clients/client-finspace/package.json index 2c02ef73cfee..5ffc7cfa7a39 100644 --- a/clients/client-finspace/package.json +++ b/clients/client-finspace/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-finspace/src/FinspaceClient.ts b/clients/client-finspace/src/FinspaceClient.ts index 8be16e04e02b..880c8bcf808c 100644 --- a/clients/client-finspace/src/FinspaceClient.ts +++ b/clients/client-finspace/src/FinspaceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -257,11 +257,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-finspace/src/runtimeConfig.browser.ts b/clients/client-finspace/src/runtimeConfig.browser.ts index c9b47ec94ea2..b7f0c74f4f8e 100644 --- a/clients/client-finspace/src/runtimeConfig.browser.ts +++ b/clients/client-finspace/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: FinspaceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-finspace/src/runtimeConfig.ts b/clients/client-finspace/src/runtimeConfig.ts index 2954956b34ea..5b0f784a22ea 100644 --- a/clients/client-finspace/src/runtimeConfig.ts +++ b/clients/client-finspace/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: FinspaceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-firehose/package.json b/clients/client-firehose/package.json index 5ed53e1bfbba..a83fcbbcd992 100644 --- a/clients/client-firehose/package.json +++ b/clients/client-firehose/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-firehose/src/FirehoseClient.ts b/clients/client-firehose/src/FirehoseClient.ts index 640a29f05568..ce47738b6363 100644 --- a/clients/client-firehose/src/FirehoseClient.ts +++ b/clients/client-firehose/src/FirehoseClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -137,11 +137,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-firehose/src/runtimeConfig.browser.ts b/clients/client-firehose/src/runtimeConfig.browser.ts index e9737a239da8..fc9cea69e5a3 100644 --- a/clients/client-firehose/src/runtimeConfig.browser.ts +++ b/clients/client-firehose/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: FirehoseClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-firehose/src/runtimeConfig.ts b/clients/client-firehose/src/runtimeConfig.ts index b46ab3b16f34..4aac897a3efa 100644 --- a/clients/client-firehose/src/runtimeConfig.ts +++ b/clients/client-firehose/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: FirehoseClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-fis/package.json b/clients/client-fis/package.json index 7f7267b88efd..2272ed4c949b 100644 --- a/clients/client-fis/package.json +++ b/clients/client-fis/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-fis/src/FisClient.ts b/clients/client-fis/src/FisClient.ts index 3ce4f82bcb92..1f33b6cde78f 100644 --- a/clients/client-fis/src/FisClient.ts +++ b/clients/client-fis/src/FisClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -197,11 +197,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-fis/src/runtimeConfig.browser.ts b/clients/client-fis/src/runtimeConfig.browser.ts index c9a0f31dd591..614f6b8fc549 100644 --- a/clients/client-fis/src/runtimeConfig.browser.ts +++ b/clients/client-fis/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: FisClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-fis/src/runtimeConfig.ts b/clients/client-fis/src/runtimeConfig.ts index eb02a92c0bf0..5e88c6ce0142 100644 --- a/clients/client-fis/src/runtimeConfig.ts +++ b/clients/client-fis/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: FisClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-fms/package.json b/clients/client-fms/package.json index 14ab5e843856..3e43db6cec70 100644 --- a/clients/client-fms/package.json +++ b/clients/client-fms/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-fms/src/FMSClient.ts b/clients/client-fms/src/FMSClient.ts index 86f3ebd88341..bfc4e9497757 100644 --- a/clients/client-fms/src/FMSClient.ts +++ b/clients/client-fms/src/FMSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -266,11 +266,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-fms/src/runtimeConfig.browser.ts b/clients/client-fms/src/runtimeConfig.browser.ts index 72b46fdf93d4..2d114b06d8fd 100644 --- a/clients/client-fms/src/runtimeConfig.browser.ts +++ b/clients/client-fms/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: FMSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-fms/src/runtimeConfig.ts b/clients/client-fms/src/runtimeConfig.ts index 22dd35efdb3f..86371ed9c5a0 100644 --- a/clients/client-fms/src/runtimeConfig.ts +++ b/clients/client-fms/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: FMSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-forecast/package.json b/clients/client-forecast/package.json index 4eab0b4d0ea7..7cfcc94cd6b4 100644 --- a/clients/client-forecast/package.json +++ b/clients/client-forecast/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-forecast/src/ForecastClient.ts b/clients/client-forecast/src/ForecastClient.ts index 8e0683b47af3..530f72fff90e 100644 --- a/clients/client-forecast/src/ForecastClient.ts +++ b/clients/client-forecast/src/ForecastClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -374,11 +374,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-forecast/src/runtimeConfig.browser.ts b/clients/client-forecast/src/runtimeConfig.browser.ts index c2de245eed24..d5355ad73fc2 100644 --- a/clients/client-forecast/src/runtimeConfig.browser.ts +++ b/clients/client-forecast/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ForecastClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-forecast/src/runtimeConfig.ts b/clients/client-forecast/src/runtimeConfig.ts index c870fd4da3fa..af5a6fa375b7 100644 --- a/clients/client-forecast/src/runtimeConfig.ts +++ b/clients/client-forecast/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ForecastClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-forecastquery/package.json b/clients/client-forecastquery/package.json index c9094a5f4407..d6a193a8e13d 100644 --- a/clients/client-forecastquery/package.json +++ b/clients/client-forecastquery/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-forecastquery/src/ForecastqueryClient.ts b/clients/client-forecastquery/src/ForecastqueryClient.ts index 369076637405..8a1d73ebe08a 100644 --- a/clients/client-forecastquery/src/ForecastqueryClient.ts +++ b/clients/client-forecastquery/src/ForecastqueryClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -82,11 +82,11 @@ export type ServiceOutputTypes = QueryForecastCommandOutput | QueryWhatIfForecas /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-forecastquery/src/runtimeConfig.browser.ts b/clients/client-forecastquery/src/runtimeConfig.browser.ts index 67b347a81b9c..5b42394cbd52 100644 --- a/clients/client-forecastquery/src/runtimeConfig.browser.ts +++ b/clients/client-forecastquery/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ForecastqueryClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-forecastquery/src/runtimeConfig.ts b/clients/client-forecastquery/src/runtimeConfig.ts index abe44576940f..ac3346b429ba 100644 --- a/clients/client-forecastquery/src/runtimeConfig.ts +++ b/clients/client-forecastquery/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ForecastqueryClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-frauddetector/package.json b/clients/client-frauddetector/package.json index d492f170c82a..4ffd22bea808 100644 --- a/clients/client-frauddetector/package.json +++ b/clients/client-frauddetector/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-frauddetector/src/FraudDetectorClient.ts b/clients/client-frauddetector/src/FraudDetectorClient.ts index fd22506aa9ac..b187b1e59cd4 100644 --- a/clients/client-frauddetector/src/FraudDetectorClient.ts +++ b/clients/client-frauddetector/src/FraudDetectorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -365,11 +365,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-frauddetector/src/runtimeConfig.browser.ts b/clients/client-frauddetector/src/runtimeConfig.browser.ts index e2ad55739a1b..812b4a02497f 100644 --- a/clients/client-frauddetector/src/runtimeConfig.browser.ts +++ b/clients/client-frauddetector/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: FraudDetectorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-frauddetector/src/runtimeConfig.ts b/clients/client-frauddetector/src/runtimeConfig.ts index b112e6ea4b5d..f9f6143fe546 100644 --- a/clients/client-frauddetector/src/runtimeConfig.ts +++ b/clients/client-frauddetector/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: FraudDetectorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-freetier/package.json b/clients/client-freetier/package.json index 9245a18ce7cc..1180fabf4e9a 100644 --- a/clients/client-freetier/package.json +++ b/clients/client-freetier/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-freetier/src/FreeTierClient.ts b/clients/client-freetier/src/FreeTierClient.ts index c876da08d38c..9f9740afff0d 100644 --- a/clients/client-freetier/src/FreeTierClient.ts +++ b/clients/client-freetier/src/FreeTierClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -78,11 +78,11 @@ export type ServiceOutputTypes = GetFreeTierUsageCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-freetier/src/runtimeConfig.browser.ts b/clients/client-freetier/src/runtimeConfig.browser.ts index 149f4e2fecd5..b284acf30226 100644 --- a/clients/client-freetier/src/runtimeConfig.browser.ts +++ b/clients/client-freetier/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: FreeTierClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-freetier/src/runtimeConfig.ts b/clients/client-freetier/src/runtimeConfig.ts index cfff74684588..1cc81b44b4d7 100644 --- a/clients/client-freetier/src/runtimeConfig.ts +++ b/clients/client-freetier/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: FreeTierClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-fsx/package.json b/clients/client-fsx/package.json index 7e65550f69e1..2bc39b8aba1a 100644 --- a/clients/client-fsx/package.json +++ b/clients/client-fsx/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-fsx/src/FSxClient.ts b/clients/client-fsx/src/FSxClient.ts index 14e4603c0328..224a112e3a6e 100644 --- a/clients/client-fsx/src/FSxClient.ts +++ b/clients/client-fsx/src/FSxClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -284,11 +284,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-fsx/src/runtimeConfig.browser.ts b/clients/client-fsx/src/runtimeConfig.browser.ts index 6587edfc1310..c0ed09406482 100644 --- a/clients/client-fsx/src/runtimeConfig.browser.ts +++ b/clients/client-fsx/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: FSxClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-fsx/src/runtimeConfig.ts b/clients/client-fsx/src/runtimeConfig.ts index 05d17ddb7b3e..8669036cadf7 100644 --- a/clients/client-fsx/src/runtimeConfig.ts +++ b/clients/client-fsx/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: FSxClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-gamelift/package.json b/clients/client-gamelift/package.json index a4b2f503f6af..e8fd46c4e926 100644 --- a/clients/client-gamelift/package.json +++ b/clients/client-gamelift/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-gamelift/src/GameLiftClient.ts b/clients/client-gamelift/src/GameLiftClient.ts index 9c5984133d0d..dd78c2f74c43 100644 --- a/clients/client-gamelift/src/GameLiftClient.ts +++ b/clients/client-gamelift/src/GameLiftClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -563,11 +563,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-gamelift/src/runtimeConfig.browser.ts b/clients/client-gamelift/src/runtimeConfig.browser.ts index 1cf06d0da2c5..690fb5284c30 100644 --- a/clients/client-gamelift/src/runtimeConfig.browser.ts +++ b/clients/client-gamelift/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: GameLiftClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-gamelift/src/runtimeConfig.ts b/clients/client-gamelift/src/runtimeConfig.ts index b1ff2a35e675..60f5295eefdf 100644 --- a/clients/client-gamelift/src/runtimeConfig.ts +++ b/clients/client-gamelift/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: GameLiftClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-glacier/package.json b/clients/client-glacier/package.json index 231522075c4b..5b02346d8b34 100644 --- a/clients/client-glacier/package.json +++ b/clients/client-glacier/package.json @@ -35,33 +35,33 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-glacier/src/GlacierClient.ts b/clients/client-glacier/src/GlacierClient.ts index 576bfe6bf66c..9c2afe1a805d 100644 --- a/clients/client-glacier/src/GlacierClient.ts +++ b/clients/client-glacier/src/GlacierClient.ts @@ -23,7 +23,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -227,11 +227,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-glacier/src/runtimeConfig.browser.ts b/clients/client-glacier/src/runtimeConfig.browser.ts index 9e48011fdf6f..5eed05bcc517 100644 --- a/clients/client-glacier/src/runtimeConfig.browser.ts +++ b/clients/client-glacier/src/runtimeConfig.browser.ts @@ -36,7 +36,7 @@ export const getRuntimeConfig = (config: GlacierClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-glacier/src/runtimeConfig.ts b/clients/client-glacier/src/runtimeConfig.ts index 547c52330b44..180c7a8ff919 100644 --- a/clients/client-glacier/src/runtimeConfig.ts +++ b/clients/client-glacier/src/runtimeConfig.ts @@ -46,7 +46,7 @@ export const getRuntimeConfig = (config: GlacierClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-global-accelerator/package.json b/clients/client-global-accelerator/package.json index bd1fc3aa4064..3c68d862d3f1 100644 --- a/clients/client-global-accelerator/package.json +++ b/clients/client-global-accelerator/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts b/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts index 8462de15327a..ebafa630fe41 100644 --- a/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts +++ b/clients/client-global-accelerator/src/GlobalAcceleratorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -359,11 +359,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-global-accelerator/src/runtimeConfig.browser.ts b/clients/client-global-accelerator/src/runtimeConfig.browser.ts index 2b7bef40c812..fd2deedf468e 100644 --- a/clients/client-global-accelerator/src/runtimeConfig.browser.ts +++ b/clients/client-global-accelerator/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: GlobalAcceleratorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-global-accelerator/src/runtimeConfig.ts b/clients/client-global-accelerator/src/runtimeConfig.ts index 823c54d4e541..cf833c1d77f0 100644 --- a/clients/client-global-accelerator/src/runtimeConfig.ts +++ b/clients/client-global-accelerator/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: GlobalAcceleratorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-glue/package.json b/clients/client-glue/package.json index 85a4d57b1bbb..d148c8a92331 100644 --- a/clients/client-glue/package.json +++ b/clients/client-glue/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-glue/src/GlueClient.ts b/clients/client-glue/src/GlueClient.ts index 04bc7f1cce5e..7efa313d9740 100644 --- a/clients/client-glue/src/GlueClient.ts +++ b/clients/client-glue/src/GlueClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -965,11 +965,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-glue/src/runtimeConfig.browser.ts b/clients/client-glue/src/runtimeConfig.browser.ts index 9eca9644add8..72a8a0fea879 100644 --- a/clients/client-glue/src/runtimeConfig.browser.ts +++ b/clients/client-glue/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: GlueClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-glue/src/runtimeConfig.ts b/clients/client-glue/src/runtimeConfig.ts index 009f39960358..2e593b2dbb02 100644 --- a/clients/client-glue/src/runtimeConfig.ts +++ b/clients/client-glue/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: GlueClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-grafana/package.json b/clients/client-grafana/package.json index 8901b435b67f..a0463f3c9133 100644 --- a/clients/client-grafana/package.json +++ b/clients/client-grafana/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-grafana/src/GrafanaClient.ts b/clients/client-grafana/src/GrafanaClient.ts index 2db14b5d5f17..498cd5d91107 100644 --- a/clients/client-grafana/src/GrafanaClient.ts +++ b/clients/client-grafana/src/GrafanaClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -158,11 +158,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-grafana/src/runtimeConfig.browser.ts b/clients/client-grafana/src/runtimeConfig.browser.ts index 629bf2be20bf..b5a252f876f7 100644 --- a/clients/client-grafana/src/runtimeConfig.browser.ts +++ b/clients/client-grafana/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: GrafanaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-grafana/src/runtimeConfig.ts b/clients/client-grafana/src/runtimeConfig.ts index 51055e6297ae..8f12f4d99781 100644 --- a/clients/client-grafana/src/runtimeConfig.ts +++ b/clients/client-grafana/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: GrafanaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-greengrass/package.json b/clients/client-greengrass/package.json index edbb4a7008b1..5c4d94d32f6b 100644 --- a/clients/client-greengrass/package.json +++ b/clients/client-greengrass/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-greengrass/src/GreengrassClient.ts b/clients/client-greengrass/src/GreengrassClient.ts index 3603738cf0f8..540fc726e322 100644 --- a/clients/client-greengrass/src/GreengrassClient.ts +++ b/clients/client-greengrass/src/GreengrassClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -581,11 +581,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-greengrass/src/runtimeConfig.browser.ts b/clients/client-greengrass/src/runtimeConfig.browser.ts index 9451ab494c8c..cdfd9335e582 100644 --- a/clients/client-greengrass/src/runtimeConfig.browser.ts +++ b/clients/client-greengrass/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: GreengrassClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-greengrass/src/runtimeConfig.ts b/clients/client-greengrass/src/runtimeConfig.ts index f32ce9fe3630..fc4e2bb82d11 100644 --- a/clients/client-greengrass/src/runtimeConfig.ts +++ b/clients/client-greengrass/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: GreengrassClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-greengrassv2/package.json b/clients/client-greengrassv2/package.json index 71ceaa767180..12573c434296 100644 --- a/clients/client-greengrassv2/package.json +++ b/clients/client-greengrassv2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-greengrassv2/src/GreengrassV2Client.ts b/clients/client-greengrassv2/src/GreengrassV2Client.ts index 2af23b4d4695..9d4f8320030a 100644 --- a/clients/client-greengrassv2/src/GreengrassV2Client.ts +++ b/clients/client-greengrassv2/src/GreengrassV2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -209,11 +209,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-greengrassv2/src/runtimeConfig.browser.ts b/clients/client-greengrassv2/src/runtimeConfig.browser.ts index 497ae20c7d6d..041330f4f5e6 100644 --- a/clients/client-greengrassv2/src/runtimeConfig.browser.ts +++ b/clients/client-greengrassv2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: GreengrassV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-greengrassv2/src/runtimeConfig.ts b/clients/client-greengrassv2/src/runtimeConfig.ts index d5c506438b23..fa8bd877f9e3 100644 --- a/clients/client-greengrassv2/src/runtimeConfig.ts +++ b/clients/client-greengrassv2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: GreengrassV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-groundstation/package.json b/clients/client-groundstation/package.json index ba2ef3154f21..a3e97d8b62ca 100644 --- a/clients/client-groundstation/package.json +++ b/clients/client-groundstation/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-groundstation/src/GroundStationClient.ts b/clients/client-groundstation/src/GroundStationClient.ts index 677617eaa51f..4b50b9af29f0 100644 --- a/clients/client-groundstation/src/GroundStationClient.ts +++ b/clients/client-groundstation/src/GroundStationClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -206,11 +206,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-groundstation/src/runtimeConfig.browser.ts b/clients/client-groundstation/src/runtimeConfig.browser.ts index d94690f7e5d9..78059b1e04f6 100644 --- a/clients/client-groundstation/src/runtimeConfig.browser.ts +++ b/clients/client-groundstation/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: GroundStationClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-groundstation/src/runtimeConfig.ts b/clients/client-groundstation/src/runtimeConfig.ts index 58d53cdca813..aea52d180828 100644 --- a/clients/client-groundstation/src/runtimeConfig.ts +++ b/clients/client-groundstation/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: GroundStationClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-guardduty/package.json b/clients/client-guardduty/package.json index e335b13a28c8..94201221c1c0 100644 --- a/clients/client-guardduty/package.json +++ b/clients/client-guardduty/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-guardduty/src/GuardDutyClient.ts b/clients/client-guardduty/src/GuardDutyClient.ts index 2e46761e3893..96185d45c0de 100644 --- a/clients/client-guardduty/src/GuardDutyClient.ts +++ b/clients/client-guardduty/src/GuardDutyClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -383,11 +383,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-guardduty/src/runtimeConfig.browser.ts b/clients/client-guardduty/src/runtimeConfig.browser.ts index a6ef1779544a..8d3b6f06cd1e 100644 --- a/clients/client-guardduty/src/runtimeConfig.browser.ts +++ b/clients/client-guardduty/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: GuardDutyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-guardduty/src/runtimeConfig.ts b/clients/client-guardduty/src/runtimeConfig.ts index 8595368eff10..c996a0487cee 100644 --- a/clients/client-guardduty/src/runtimeConfig.ts +++ b/clients/client-guardduty/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: GuardDutyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-health/package.json b/clients/client-health/package.json index 1eac9060f8ee..9bae8acad121 100644 --- a/clients/client-health/package.json +++ b/clients/client-health/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-health/src/HealthClient.ts b/clients/client-health/src/HealthClient.ts index 23940e8963f2..7811fe36b926 100644 --- a/clients/client-health/src/HealthClient.ts +++ b/clients/client-health/src/HealthClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -155,11 +155,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-health/src/runtimeConfig.browser.ts b/clients/client-health/src/runtimeConfig.browser.ts index 052a28dc28a8..bb4d36a1cea4 100644 --- a/clients/client-health/src/runtimeConfig.browser.ts +++ b/clients/client-health/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: HealthClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-health/src/runtimeConfig.ts b/clients/client-health/src/runtimeConfig.ts index 2a9c02194e12..b13e8cf5f4e0 100644 --- a/clients/client-health/src/runtimeConfig.ts +++ b/clients/client-health/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: HealthClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-healthlake/package.json b/clients/client-healthlake/package.json index 598f298cd0be..a211b817123e 100644 --- a/clients/client-healthlake/package.json +++ b/clients/client-healthlake/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-healthlake/src/HealthLakeClient.ts b/clients/client-healthlake/src/HealthLakeClient.ts index 1f298dcb0500..b5368e0ca8e4 100644 --- a/clients/client-healthlake/src/HealthLakeClient.ts +++ b/clients/client-healthlake/src/HealthLakeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -134,11 +134,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-healthlake/src/runtimeConfig.browser.ts b/clients/client-healthlake/src/runtimeConfig.browser.ts index 1cf07164ce18..cfe6420e6d7c 100644 --- a/clients/client-healthlake/src/runtimeConfig.browser.ts +++ b/clients/client-healthlake/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: HealthLakeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-healthlake/src/runtimeConfig.ts b/clients/client-healthlake/src/runtimeConfig.ts index c6ddf957b2da..5be83956dacf 100644 --- a/clients/client-healthlake/src/runtimeConfig.ts +++ b/clients/client-healthlake/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: HealthLakeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-honeycode/package.json b/clients/client-honeycode/package.json index c154692b6d9d..15189c269822 100644 --- a/clients/client-honeycode/package.json +++ b/clients/client-honeycode/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-honeycode/src/HoneycodeClient.ts b/clients/client-honeycode/src/HoneycodeClient.ts index 75b0f08197de..718756626b4d 100644 --- a/clients/client-honeycode/src/HoneycodeClient.ts +++ b/clients/client-honeycode/src/HoneycodeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -146,11 +146,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-honeycode/src/runtimeConfig.browser.ts b/clients/client-honeycode/src/runtimeConfig.browser.ts index c2c16f8d4887..8c7114449dfb 100644 --- a/clients/client-honeycode/src/runtimeConfig.browser.ts +++ b/clients/client-honeycode/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: HoneycodeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-honeycode/src/runtimeConfig.ts b/clients/client-honeycode/src/runtimeConfig.ts index 4f46692d0780..9e04b2dce715 100644 --- a/clients/client-honeycode/src/runtimeConfig.ts +++ b/clients/client-honeycode/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: HoneycodeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iam/package.json b/clients/client-iam/package.json index 4f3d115fa304..381197023de4 100644 --- a/clients/client-iam/package.json +++ b/clients/client-iam/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-iam/src/IAMClient.ts b/clients/client-iam/src/IAMClient.ts index f82ebce55fb1..ff288e68f0cd 100644 --- a/clients/client-iam/src/IAMClient.ts +++ b/clients/client-iam/src/IAMClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -779,11 +779,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iam/src/runtimeConfig.browser.ts b/clients/client-iam/src/runtimeConfig.browser.ts index 3d07b2c2ca10..c580027bdf41 100644 --- a/clients/client-iam/src/runtimeConfig.browser.ts +++ b/clients/client-iam/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IAMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iam/src/runtimeConfig.ts b/clients/client-iam/src/runtimeConfig.ts index e2852ecf5e7e..c2077261b3eb 100644 --- a/clients/client-iam/src/runtimeConfig.ts +++ b/clients/client-iam/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IAMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-identitystore/package.json b/clients/client-identitystore/package.json index e5bc7d4e25e3..7b582602ecfa 100644 --- a/clients/client-identitystore/package.json +++ b/clients/client-identitystore/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-identitystore/src/IdentitystoreClient.ts b/clients/client-identitystore/src/IdentitystoreClient.ts index e099ac68b9c4..a501c26fa37c 100644 --- a/clients/client-identitystore/src/IdentitystoreClient.ts +++ b/clients/client-identitystore/src/IdentitystoreClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -152,11 +152,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-identitystore/src/runtimeConfig.browser.ts b/clients/client-identitystore/src/runtimeConfig.browser.ts index 4dbfd109a5f0..b90e43f822b6 100644 --- a/clients/client-identitystore/src/runtimeConfig.browser.ts +++ b/clients/client-identitystore/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IdentitystoreClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-identitystore/src/runtimeConfig.ts b/clients/client-identitystore/src/runtimeConfig.ts index 6a1442c6896d..69b98ec01b56 100644 --- a/clients/client-identitystore/src/runtimeConfig.ts +++ b/clients/client-identitystore/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IdentitystoreClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-imagebuilder/package.json b/clients/client-imagebuilder/package.json index d112b00c2af3..0994604e3a0d 100644 --- a/clients/client-imagebuilder/package.json +++ b/clients/client-imagebuilder/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-imagebuilder/src/ImagebuilderClient.ts b/clients/client-imagebuilder/src/ImagebuilderClient.ts index c262b12c9eca..b93bb63ed646 100644 --- a/clients/client-imagebuilder/src/ImagebuilderClient.ts +++ b/clients/client-imagebuilder/src/ImagebuilderClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -428,11 +428,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-imagebuilder/src/runtimeConfig.browser.ts b/clients/client-imagebuilder/src/runtimeConfig.browser.ts index 3d36c5d25325..0413126a74b9 100644 --- a/clients/client-imagebuilder/src/runtimeConfig.browser.ts +++ b/clients/client-imagebuilder/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ImagebuilderClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-imagebuilder/src/runtimeConfig.ts b/clients/client-imagebuilder/src/runtimeConfig.ts index c30f053a7c7e..d7be81208a5f 100644 --- a/clients/client-imagebuilder/src/runtimeConfig.ts +++ b/clients/client-imagebuilder/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ImagebuilderClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-inspector-scan/package.json b/clients/client-inspector-scan/package.json index d89f5fe6aef3..9051bf6a1e82 100644 --- a/clients/client-inspector-scan/package.json +++ b/clients/client-inspector-scan/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-inspector-scan/src/InspectorScanClient.ts b/clients/client-inspector-scan/src/InspectorScanClient.ts index bff86b87171b..fb82b684a829 100644 --- a/clients/client-inspector-scan/src/InspectorScanClient.ts +++ b/clients/client-inspector-scan/src/InspectorScanClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -78,11 +78,11 @@ export type ServiceOutputTypes = ScanSbomCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-inspector-scan/src/runtimeConfig.browser.ts b/clients/client-inspector-scan/src/runtimeConfig.browser.ts index ad101648dbe5..aa9c893f274a 100644 --- a/clients/client-inspector-scan/src/runtimeConfig.browser.ts +++ b/clients/client-inspector-scan/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: InspectorScanClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-inspector-scan/src/runtimeConfig.ts b/clients/client-inspector-scan/src/runtimeConfig.ts index 46a72fd67fe6..1e936ce72a2d 100644 --- a/clients/client-inspector-scan/src/runtimeConfig.ts +++ b/clients/client-inspector-scan/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: InspectorScanClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-inspector/package.json b/clients/client-inspector/package.json index 990b217ee010..6f8b8bb2880d 100644 --- a/clients/client-inspector/package.json +++ b/clients/client-inspector/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-inspector/src/InspectorClient.ts b/clients/client-inspector/src/InspectorClient.ts index 6d87b615c65b..54f954ed2781 100644 --- a/clients/client-inspector/src/InspectorClient.ts +++ b/clients/client-inspector/src/InspectorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -266,11 +266,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-inspector/src/runtimeConfig.browser.ts b/clients/client-inspector/src/runtimeConfig.browser.ts index b52018c50687..444e6268a1b5 100644 --- a/clients/client-inspector/src/runtimeConfig.browser.ts +++ b/clients/client-inspector/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: InspectorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-inspector/src/runtimeConfig.ts b/clients/client-inspector/src/runtimeConfig.ts index 284e764765f5..da2ec739e23e 100644 --- a/clients/client-inspector/src/runtimeConfig.ts +++ b/clients/client-inspector/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: InspectorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-inspector2/package.json b/clients/client-inspector2/package.json index db648dcc1a70..2c6581335b8f 100644 --- a/clients/client-inspector2/package.json +++ b/clients/client-inspector2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-inspector2/src/Inspector2Client.ts b/clients/client-inspector2/src/Inspector2Client.ts index 1116a85decb2..6b5d421a5d84 100644 --- a/clients/client-inspector2/src/Inspector2Client.ts +++ b/clients/client-inspector2/src/Inspector2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -356,11 +356,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-inspector2/src/runtimeConfig.browser.ts b/clients/client-inspector2/src/runtimeConfig.browser.ts index c8b97e79daf9..cd182c1df9bb 100644 --- a/clients/client-inspector2/src/runtimeConfig.browser.ts +++ b/clients/client-inspector2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: Inspector2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-inspector2/src/runtimeConfig.ts b/clients/client-inspector2/src/runtimeConfig.ts index 5d8765ea3a53..ab99a17cb1f7 100644 --- a/clients/client-inspector2/src/runtimeConfig.ts +++ b/clients/client-inspector2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: Inspector2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-internetmonitor/package.json b/clients/client-internetmonitor/package.json index 2797975afac6..7adef9750a15 100644 --- a/clients/client-internetmonitor/package.json +++ b/clients/client-internetmonitor/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-internetmonitor/src/InternetMonitorClient.ts b/clients/client-internetmonitor/src/InternetMonitorClient.ts index 594ea7a9fe7d..e7befcb467b1 100644 --- a/clients/client-internetmonitor/src/InternetMonitorClient.ts +++ b/clients/client-internetmonitor/src/InternetMonitorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -122,11 +122,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-internetmonitor/src/runtimeConfig.browser.ts b/clients/client-internetmonitor/src/runtimeConfig.browser.ts index bb9f4c981007..996571e0df69 100644 --- a/clients/client-internetmonitor/src/runtimeConfig.browser.ts +++ b/clients/client-internetmonitor/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: InternetMonitorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-internetmonitor/src/runtimeConfig.ts b/clients/client-internetmonitor/src/runtimeConfig.ts index 0b10cb9ee6cb..5c6a80bc2b7f 100644 --- a/clients/client-internetmonitor/src/runtimeConfig.ts +++ b/clients/client-internetmonitor/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: InternetMonitorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iot-1click-devices-service/package.json b/clients/client-iot-1click-devices-service/package.json index c054bf3146f8..8ece72bca495 100644 --- a/clients/client-iot-1click-devices-service/package.json +++ b/clients/client-iot-1click-devices-service/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iot-1click-devices-service/src/IoT1ClickDevicesServiceClient.ts b/clients/client-iot-1click-devices-service/src/IoT1ClickDevicesServiceClient.ts index 0f9569e3e32a..a9a5b10d63f2 100644 --- a/clients/client-iot-1click-devices-service/src/IoT1ClickDevicesServiceClient.ts +++ b/clients/client-iot-1click-devices-service/src/IoT1ClickDevicesServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -128,11 +128,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iot-1click-devices-service/src/runtimeConfig.browser.ts b/clients/client-iot-1click-devices-service/src/runtimeConfig.browser.ts index 5a453ae8f37c..a930780fd98b 100644 --- a/clients/client-iot-1click-devices-service/src/runtimeConfig.browser.ts +++ b/clients/client-iot-1click-devices-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoT1ClickDevicesServiceClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iot-1click-devices-service/src/runtimeConfig.ts b/clients/client-iot-1click-devices-service/src/runtimeConfig.ts index 6196511aed99..f09b12cdd7e0 100644 --- a/clients/client-iot-1click-devices-service/src/runtimeConfig.ts +++ b/clients/client-iot-1click-devices-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoT1ClickDevicesServiceClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iot-1click-projects/package.json b/clients/client-iot-1click-projects/package.json index 58bb01162b70..a73b05df49a8 100644 --- a/clients/client-iot-1click-projects/package.json +++ b/clients/client-iot-1click-projects/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iot-1click-projects/src/IoT1ClickProjectsClient.ts b/clients/client-iot-1click-projects/src/IoT1ClickProjectsClient.ts index 0aa27eeff3eb..a2373627557c 100644 --- a/clients/client-iot-1click-projects/src/IoT1ClickProjectsClient.ts +++ b/clients/client-iot-1click-projects/src/IoT1ClickProjectsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -137,11 +137,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iot-1click-projects/src/runtimeConfig.browser.ts b/clients/client-iot-1click-projects/src/runtimeConfig.browser.ts index 67e5ba5bcbe1..d064070dd2a4 100644 --- a/clients/client-iot-1click-projects/src/runtimeConfig.browser.ts +++ b/clients/client-iot-1click-projects/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoT1ClickProjectsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iot-1click-projects/src/runtimeConfig.ts b/clients/client-iot-1click-projects/src/runtimeConfig.ts index a57030637bba..503f39dfdfce 100644 --- a/clients/client-iot-1click-projects/src/runtimeConfig.ts +++ b/clients/client-iot-1click-projects/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoT1ClickProjectsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iot-data-plane/package.json b/clients/client-iot-data-plane/package.json index 862231a7b124..1045f3d0a635 100644 --- a/clients/client-iot-data-plane/package.json +++ b/clients/client-iot-data-plane/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iot-data-plane/src/IoTDataPlaneClient.ts b/clients/client-iot-data-plane/src/IoTDataPlaneClient.ts index 95455effcb8a..94e87f377889 100644 --- a/clients/client-iot-data-plane/src/IoTDataPlaneClient.ts +++ b/clients/client-iot-data-plane/src/IoTDataPlaneClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -104,11 +104,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iot-data-plane/src/runtimeConfig.browser.ts b/clients/client-iot-data-plane/src/runtimeConfig.browser.ts index a8843d03393d..93b49d305831 100644 --- a/clients/client-iot-data-plane/src/runtimeConfig.browser.ts +++ b/clients/client-iot-data-plane/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTDataPlaneClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iot-data-plane/src/runtimeConfig.ts b/clients/client-iot-data-plane/src/runtimeConfig.ts index b300ed799b5c..b2a9542454cf 100644 --- a/clients/client-iot-data-plane/src/runtimeConfig.ts +++ b/clients/client-iot-data-plane/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTDataPlaneClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iot-events-data/package.json b/clients/client-iot-events-data/package.json index 216a3a2ed001..ff2896d071ec 100644 --- a/clients/client-iot-events-data/package.json +++ b/clients/client-iot-events-data/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iot-events-data/src/IoTEventsDataClient.ts b/clients/client-iot-events-data/src/IoTEventsDataClient.ts index 19cc1c152a73..b7fe36198a4f 100644 --- a/clients/client-iot-events-data/src/IoTEventsDataClient.ts +++ b/clients/client-iot-events-data/src/IoTEventsDataClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -122,11 +122,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iot-events-data/src/runtimeConfig.browser.ts b/clients/client-iot-events-data/src/runtimeConfig.browser.ts index 40db2d582b3c..aeb6d74117ad 100644 --- a/clients/client-iot-events-data/src/runtimeConfig.browser.ts +++ b/clients/client-iot-events-data/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTEventsDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iot-events-data/src/runtimeConfig.ts b/clients/client-iot-events-data/src/runtimeConfig.ts index f2984138c601..c32f7d7298d1 100644 --- a/clients/client-iot-events-data/src/runtimeConfig.ts +++ b/clients/client-iot-events-data/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTEventsDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iot-events/package.json b/clients/client-iot-events/package.json index 80e404fc4bd1..fdef33d110fb 100644 --- a/clients/client-iot-events/package.json +++ b/clients/client-iot-events/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iot-events/src/IoTEventsClient.ts b/clients/client-iot-events/src/IoTEventsClient.ts index e52416533d85..237aaa38d274 100644 --- a/clients/client-iot-events/src/IoTEventsClient.ts +++ b/clients/client-iot-events/src/IoTEventsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -188,11 +188,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iot-events/src/runtimeConfig.browser.ts b/clients/client-iot-events/src/runtimeConfig.browser.ts index 83ba34e5c2b6..725a74c6d7ce 100644 --- a/clients/client-iot-events/src/runtimeConfig.browser.ts +++ b/clients/client-iot-events/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTEventsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iot-events/src/runtimeConfig.ts b/clients/client-iot-events/src/runtimeConfig.ts index 71f9e543b82c..911ce4d63f26 100644 --- a/clients/client-iot-events/src/runtimeConfig.ts +++ b/clients/client-iot-events/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTEventsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iot-jobs-data-plane/package.json b/clients/client-iot-jobs-data-plane/package.json index cb8f73cf75d3..b7663344ed16 100644 --- a/clients/client-iot-jobs-data-plane/package.json +++ b/clients/client-iot-jobs-data-plane/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iot-jobs-data-plane/src/IoTJobsDataPlaneClient.ts b/clients/client-iot-jobs-data-plane/src/IoTJobsDataPlaneClient.ts index 35a64efe6599..49230faf32a9 100644 --- a/clients/client-iot-jobs-data-plane/src/IoTJobsDataPlaneClient.ts +++ b/clients/client-iot-jobs-data-plane/src/IoTJobsDataPlaneClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -98,11 +98,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iot-jobs-data-plane/src/runtimeConfig.browser.ts b/clients/client-iot-jobs-data-plane/src/runtimeConfig.browser.ts index 754c0d68f52b..ac65b5c88e39 100644 --- a/clients/client-iot-jobs-data-plane/src/runtimeConfig.browser.ts +++ b/clients/client-iot-jobs-data-plane/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTJobsDataPlaneClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iot-jobs-data-plane/src/runtimeConfig.ts b/clients/client-iot-jobs-data-plane/src/runtimeConfig.ts index 4396c09d6b64..4993f7b9efd5 100644 --- a/clients/client-iot-jobs-data-plane/src/runtimeConfig.ts +++ b/clients/client-iot-jobs-data-plane/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTJobsDataPlaneClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iot-roborunner/package.json b/clients/client-iot-roborunner/package.json index a3a1f19379e4..3c20b358827d 100644 --- a/clients/client-iot-roborunner/package.json +++ b/clients/client-iot-roborunner/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-iot-roborunner/src/IoTRoboRunnerClient.ts b/clients/client-iot-roborunner/src/IoTRoboRunnerClient.ts index 3a24e3e56fed..55339c382c8c 100644 --- a/clients/client-iot-roborunner/src/IoTRoboRunnerClient.ts +++ b/clients/client-iot-roborunner/src/IoTRoboRunnerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -137,11 +137,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iot-roborunner/src/runtimeConfig.browser.ts b/clients/client-iot-roborunner/src/runtimeConfig.browser.ts index 80d5ec061470..138d469f2ff3 100644 --- a/clients/client-iot-roborunner/src/runtimeConfig.browser.ts +++ b/clients/client-iot-roborunner/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTRoboRunnerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iot-roborunner/src/runtimeConfig.ts b/clients/client-iot-roborunner/src/runtimeConfig.ts index d9bf935c3e7e..5ce25e8a30e8 100644 --- a/clients/client-iot-roborunner/src/runtimeConfig.ts +++ b/clients/client-iot-roborunner/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTRoboRunnerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iot-wireless/package.json b/clients/client-iot-wireless/package.json index 17fef7ccee3c..74435b5ad4b1 100644 --- a/clients/client-iot-wireless/package.json +++ b/clients/client-iot-wireless/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-iot-wireless/src/IoTWirelessClient.ts b/clients/client-iot-wireless/src/IoTWirelessClient.ts index 19cc81d5ffa8..f0ea2714c086 100644 --- a/clients/client-iot-wireless/src/IoTWirelessClient.ts +++ b/clients/client-iot-wireless/src/IoTWirelessClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -656,11 +656,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iot-wireless/src/runtimeConfig.browser.ts b/clients/client-iot-wireless/src/runtimeConfig.browser.ts index fe92377dd07c..42f260e8ee69 100644 --- a/clients/client-iot-wireless/src/runtimeConfig.browser.ts +++ b/clients/client-iot-wireless/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTWirelessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iot-wireless/src/runtimeConfig.ts b/clients/client-iot-wireless/src/runtimeConfig.ts index 337e8dfbb17b..cef03c2400ec 100644 --- a/clients/client-iot-wireless/src/runtimeConfig.ts +++ b/clients/client-iot-wireless/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTWirelessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iot/package.json b/clients/client-iot/package.json index 38c1bdbe5239..4c202e586669 100644 --- a/clients/client-iot/package.json +++ b/clients/client-iot/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-iot/src/IoTClient.ts b/clients/client-iot/src/IoTClient.ts index 4d63ecdd6954..d599776e8061 100644 --- a/clients/client-iot/src/IoTClient.ts +++ b/clients/client-iot/src/IoTClient.ts @@ -28,7 +28,7 @@ import { RetryInputConfig, RetryResolvedConfig, } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -1292,11 +1292,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iot/src/runtimeConfig.browser.ts b/clients/client-iot/src/runtimeConfig.browser.ts index a13c1bb8eb08..2dedbbaf6fdb 100644 --- a/clients/client-iot/src/runtimeConfig.browser.ts +++ b/clients/client-iot/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iot/src/runtimeConfig.ts b/clients/client-iot/src/runtimeConfig.ts index ef1dba965981..ce092355a498 100644 --- a/clients/client-iot/src/runtimeConfig.ts +++ b/clients/client-iot/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iotanalytics/package.json b/clients/client-iotanalytics/package.json index 1d98e2d0c529..6de2c975d58f 100644 --- a/clients/client-iotanalytics/package.json +++ b/clients/client-iotanalytics/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iotanalytics/src/IoTAnalyticsClient.ts b/clients/client-iotanalytics/src/IoTAnalyticsClient.ts index ade3c0483e1f..1357e2394aea 100644 --- a/clients/client-iotanalytics/src/IoTAnalyticsClient.ts +++ b/clients/client-iotanalytics/src/IoTAnalyticsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -203,11 +203,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iotanalytics/src/runtimeConfig.browser.ts b/clients/client-iotanalytics/src/runtimeConfig.browser.ts index 6400935ea40c..58bf0e2e6ac1 100644 --- a/clients/client-iotanalytics/src/runtimeConfig.browser.ts +++ b/clients/client-iotanalytics/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTAnalyticsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iotanalytics/src/runtimeConfig.ts b/clients/client-iotanalytics/src/runtimeConfig.ts index ac5ad0b3959d..4c32406f5f17 100644 --- a/clients/client-iotanalytics/src/runtimeConfig.ts +++ b/clients/client-iotanalytics/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTAnalyticsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iotdeviceadvisor/package.json b/clients/client-iotdeviceadvisor/package.json index 70945044208b..16e29f6cd27c 100644 --- a/clients/client-iotdeviceadvisor/package.json +++ b/clients/client-iotdeviceadvisor/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts b/clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts index 88495f236542..fac7e05d1677 100644 --- a/clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts +++ b/clients/client-iotdeviceadvisor/src/IotDeviceAdvisorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -134,11 +134,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iotdeviceadvisor/src/runtimeConfig.browser.ts b/clients/client-iotdeviceadvisor/src/runtimeConfig.browser.ts index 078e88d8b86c..494b054e61ea 100644 --- a/clients/client-iotdeviceadvisor/src/runtimeConfig.browser.ts +++ b/clients/client-iotdeviceadvisor/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IotDeviceAdvisorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iotdeviceadvisor/src/runtimeConfig.ts b/clients/client-iotdeviceadvisor/src/runtimeConfig.ts index 82d3a0ca9b9d..66245575e8e3 100644 --- a/clients/client-iotdeviceadvisor/src/runtimeConfig.ts +++ b/clients/client-iotdeviceadvisor/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IotDeviceAdvisorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iotfleethub/package.json b/clients/client-iotfleethub/package.json index 281a9daeab86..4c30f5d8c1bc 100644 --- a/clients/client-iotfleethub/package.json +++ b/clients/client-iotfleethub/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-iotfleethub/src/IoTFleetHubClient.ts b/clients/client-iotfleethub/src/IoTFleetHubClient.ts index c1cbf41eb045..5f1aa2aea925 100644 --- a/clients/client-iotfleethub/src/IoTFleetHubClient.ts +++ b/clients/client-iotfleethub/src/IoTFleetHubClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -107,11 +107,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iotfleethub/src/runtimeConfig.browser.ts b/clients/client-iotfleethub/src/runtimeConfig.browser.ts index 2fa312dd897a..e9a9b6267246 100644 --- a/clients/client-iotfleethub/src/runtimeConfig.browser.ts +++ b/clients/client-iotfleethub/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTFleetHubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iotfleethub/src/runtimeConfig.ts b/clients/client-iotfleethub/src/runtimeConfig.ts index ccb15c9d8405..a6e9a2d85e61 100644 --- a/clients/client-iotfleethub/src/runtimeConfig.ts +++ b/clients/client-iotfleethub/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTFleetHubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iotfleetwise/package.json b/clients/client-iotfleetwise/package.json index 5e70373171c0..b6865975e1d9 100644 --- a/clients/client-iotfleetwise/package.json +++ b/clients/client-iotfleetwise/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iotfleetwise/src/IoTFleetWiseClient.ts b/clients/client-iotfleetwise/src/IoTFleetWiseClient.ts index 4d899f8160f6..06553904205b 100644 --- a/clients/client-iotfleetwise/src/IoTFleetWiseClient.ts +++ b/clients/client-iotfleetwise/src/IoTFleetWiseClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -305,11 +305,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iotfleetwise/src/runtimeConfig.browser.ts b/clients/client-iotfleetwise/src/runtimeConfig.browser.ts index ec46fc467d07..ce31e5eb6af1 100644 --- a/clients/client-iotfleetwise/src/runtimeConfig.browser.ts +++ b/clients/client-iotfleetwise/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTFleetWiseClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iotfleetwise/src/runtimeConfig.ts b/clients/client-iotfleetwise/src/runtimeConfig.ts index a0918cabed92..9a1c110edabe 100644 --- a/clients/client-iotfleetwise/src/runtimeConfig.ts +++ b/clients/client-iotfleetwise/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTFleetWiseClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iotsecuretunneling/package.json b/clients/client-iotsecuretunneling/package.json index df3bd6b6cbcf..86906166a4b3 100644 --- a/clients/client-iotsecuretunneling/package.json +++ b/clients/client-iotsecuretunneling/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iotsecuretunneling/src/IoTSecureTunnelingClient.ts b/clients/client-iotsecuretunneling/src/IoTSecureTunnelingClient.ts index 31bc1ab40521..a49aa1cc9185 100644 --- a/clients/client-iotsecuretunneling/src/IoTSecureTunnelingClient.ts +++ b/clients/client-iotsecuretunneling/src/IoTSecureTunnelingClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -107,11 +107,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iotsecuretunneling/src/runtimeConfig.browser.ts b/clients/client-iotsecuretunneling/src/runtimeConfig.browser.ts index 9017988c8273..a7b65f775369 100644 --- a/clients/client-iotsecuretunneling/src/runtimeConfig.browser.ts +++ b/clients/client-iotsecuretunneling/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTSecureTunnelingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iotsecuretunneling/src/runtimeConfig.ts b/clients/client-iotsecuretunneling/src/runtimeConfig.ts index f8f47664afaf..a1c7e9159762 100644 --- a/clients/client-iotsecuretunneling/src/runtimeConfig.ts +++ b/clients/client-iotsecuretunneling/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTSecureTunnelingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iotsitewise/package.json b/clients/client-iotsitewise/package.json index 5ce1a9d264ba..fa00c09f1f57 100644 --- a/clients/client-iotsitewise/package.json +++ b/clients/client-iotsitewise/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-iotsitewise/src/IoTSiteWiseClient.ts b/clients/client-iotsitewise/src/IoTSiteWiseClient.ts index 910cb5d9309a..6e511e66ea0c 100644 --- a/clients/client-iotsitewise/src/IoTSiteWiseClient.ts +++ b/clients/client-iotsitewise/src/IoTSiteWiseClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -437,11 +437,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iotsitewise/src/runtimeConfig.browser.ts b/clients/client-iotsitewise/src/runtimeConfig.browser.ts index 762d55aedc96..c9aab2e13f4c 100644 --- a/clients/client-iotsitewise/src/runtimeConfig.browser.ts +++ b/clients/client-iotsitewise/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTSiteWiseClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iotsitewise/src/runtimeConfig.ts b/clients/client-iotsitewise/src/runtimeConfig.ts index 4ebc795a3c61..27276ee7d40e 100644 --- a/clients/client-iotsitewise/src/runtimeConfig.ts +++ b/clients/client-iotsitewise/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTSiteWiseClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iotthingsgraph/package.json b/clients/client-iotthingsgraph/package.json index cbb6d5cbfe70..607af2ab5c19 100644 --- a/clients/client-iotthingsgraph/package.json +++ b/clients/client-iotthingsgraph/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iotthingsgraph/src/IoTThingsGraphClient.ts b/clients/client-iotthingsgraph/src/IoTThingsGraphClient.ts index 2d4e97b3906b..131fa7d4e3dc 100644 --- a/clients/client-iotthingsgraph/src/IoTThingsGraphClient.ts +++ b/clients/client-iotthingsgraph/src/IoTThingsGraphClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -245,11 +245,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iotthingsgraph/src/runtimeConfig.browser.ts b/clients/client-iotthingsgraph/src/runtimeConfig.browser.ts index df8f092e2ea8..11b3e95787e6 100644 --- a/clients/client-iotthingsgraph/src/runtimeConfig.browser.ts +++ b/clients/client-iotthingsgraph/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTThingsGraphClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iotthingsgraph/src/runtimeConfig.ts b/clients/client-iotthingsgraph/src/runtimeConfig.ts index d16f4e48d384..5ac2f97be578 100644 --- a/clients/client-iotthingsgraph/src/runtimeConfig.ts +++ b/clients/client-iotthingsgraph/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTThingsGraphClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-iottwinmaker/package.json b/clients/client-iottwinmaker/package.json index a4e1d1876920..ca52eb15ecd9 100644 --- a/clients/client-iottwinmaker/package.json +++ b/clients/client-iottwinmaker/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-iottwinmaker/src/IoTTwinMakerClient.ts b/clients/client-iottwinmaker/src/IoTTwinMakerClient.ts index 4a61b8785875..6d44cd2239e4 100644 --- a/clients/client-iottwinmaker/src/IoTTwinMakerClient.ts +++ b/clients/client-iottwinmaker/src/IoTTwinMakerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -227,11 +227,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-iottwinmaker/src/runtimeConfig.browser.ts b/clients/client-iottwinmaker/src/runtimeConfig.browser.ts index aa667afda727..a01c94ba63bb 100644 --- a/clients/client-iottwinmaker/src/runtimeConfig.browser.ts +++ b/clients/client-iottwinmaker/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IoTTwinMakerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-iottwinmaker/src/runtimeConfig.ts b/clients/client-iottwinmaker/src/runtimeConfig.ts index a1509e3bf461..1051f6cba054 100644 --- a/clients/client-iottwinmaker/src/runtimeConfig.ts +++ b/clients/client-iottwinmaker/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IoTTwinMakerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ivs-realtime/package.json b/clients/client-ivs-realtime/package.json index 7a7db730dae0..22cbb28b18b5 100644 --- a/clients/client-ivs-realtime/package.json +++ b/clients/client-ivs-realtime/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-ivs-realtime/src/IVSRealTimeClient.ts b/clients/client-ivs-realtime/src/IVSRealTimeClient.ts index 544beba8d74a..736edc6cbf53 100644 --- a/clients/client-ivs-realtime/src/IVSRealTimeClient.ts +++ b/clients/client-ivs-realtime/src/IVSRealTimeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -194,11 +194,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ivs-realtime/src/runtimeConfig.browser.ts b/clients/client-ivs-realtime/src/runtimeConfig.browser.ts index a90edbd0e341..801855bda46c 100644 --- a/clients/client-ivs-realtime/src/runtimeConfig.browser.ts +++ b/clients/client-ivs-realtime/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IVSRealTimeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ivs-realtime/src/runtimeConfig.ts b/clients/client-ivs-realtime/src/runtimeConfig.ts index 67705596829c..c0b139c10242 100644 --- a/clients/client-ivs-realtime/src/runtimeConfig.ts +++ b/clients/client-ivs-realtime/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IVSRealTimeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ivs/package.json b/clients/client-ivs/package.json index c8d9abb8f8c8..2223f1c1ae81 100644 --- a/clients/client-ivs/package.json +++ b/clients/client-ivs/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-ivs/src/IvsClient.ts b/clients/client-ivs/src/IvsClient.ts index f0b2fbe79378..b74ae382fe59 100644 --- a/clients/client-ivs/src/IvsClient.ts +++ b/clients/client-ivs/src/IvsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -227,11 +227,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ivs/src/runtimeConfig.browser.ts b/clients/client-ivs/src/runtimeConfig.browser.ts index f353ccb950a0..578b516d4fdc 100644 --- a/clients/client-ivs/src/runtimeConfig.browser.ts +++ b/clients/client-ivs/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IvsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ivs/src/runtimeConfig.ts b/clients/client-ivs/src/runtimeConfig.ts index b52efbfe1745..85f8f75aa5e4 100644 --- a/clients/client-ivs/src/runtimeConfig.ts +++ b/clients/client-ivs/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IvsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ivschat/package.json b/clients/client-ivschat/package.json index 088ada1cb218..be08f086dec1 100644 --- a/clients/client-ivschat/package.json +++ b/clients/client-ivschat/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-ivschat/src/IvschatClient.ts b/clients/client-ivschat/src/IvschatClient.ts index 3c10249d5322..699ccf025fdf 100644 --- a/clients/client-ivschat/src/IvschatClient.ts +++ b/clients/client-ivschat/src/IvschatClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -146,11 +146,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ivschat/src/runtimeConfig.browser.ts b/clients/client-ivschat/src/runtimeConfig.browser.ts index d7bd85fa11bd..e71499aa1a04 100644 --- a/clients/client-ivschat/src/runtimeConfig.browser.ts +++ b/clients/client-ivschat/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: IvschatClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ivschat/src/runtimeConfig.ts b/clients/client-ivschat/src/runtimeConfig.ts index 770b813c77db..bce973ac6335 100644 --- a/clients/client-ivschat/src/runtimeConfig.ts +++ b/clients/client-ivschat/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: IvschatClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kafka/package.json b/clients/client-kafka/package.json index 0946e5b18c70..b55ff407d699 100644 --- a/clients/client-kafka/package.json +++ b/clients/client-kafka/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kafka/src/KafkaClient.ts b/clients/client-kafka/src/KafkaClient.ts index 6a43bc920a4f..35347152ee2e 100644 --- a/clients/client-kafka/src/KafkaClient.ts +++ b/clients/client-kafka/src/KafkaClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -308,11 +308,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kafka/src/runtimeConfig.browser.ts b/clients/client-kafka/src/runtimeConfig.browser.ts index 992d03192484..c8fbb838db83 100644 --- a/clients/client-kafka/src/runtimeConfig.browser.ts +++ b/clients/client-kafka/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KafkaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kafka/src/runtimeConfig.ts b/clients/client-kafka/src/runtimeConfig.ts index ee39a1bd4c43..3b9c7e5ecc20 100644 --- a/clients/client-kafka/src/runtimeConfig.ts +++ b/clients/client-kafka/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KafkaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kafkaconnect/package.json b/clients/client-kafkaconnect/package.json index 0c5777ecf961..3c4f1c185bb0 100644 --- a/clients/client-kafkaconnect/package.json +++ b/clients/client-kafkaconnect/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kafkaconnect/src/KafkaConnectClient.ts b/clients/client-kafkaconnect/src/KafkaConnectClient.ts index 1e7451df7192..1e1c76b7b03e 100644 --- a/clients/client-kafkaconnect/src/KafkaConnectClient.ts +++ b/clients/client-kafkaconnect/src/KafkaConnectClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -125,11 +125,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kafkaconnect/src/runtimeConfig.browser.ts b/clients/client-kafkaconnect/src/runtimeConfig.browser.ts index c8b4c77a125f..cf165fa664f2 100644 --- a/clients/client-kafkaconnect/src/runtimeConfig.browser.ts +++ b/clients/client-kafkaconnect/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KafkaConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kafkaconnect/src/runtimeConfig.ts b/clients/client-kafkaconnect/src/runtimeConfig.ts index 357cb4c76ee7..3ca7192df937 100644 --- a/clients/client-kafkaconnect/src/runtimeConfig.ts +++ b/clients/client-kafkaconnect/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KafkaConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kendra-ranking/package.json b/clients/client-kendra-ranking/package.json index 0cf09370c783..21e787b6fd35 100644 --- a/clients/client-kendra-ranking/package.json +++ b/clients/client-kendra-ranking/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-kendra-ranking/src/KendraRankingClient.ts b/clients/client-kendra-ranking/src/KendraRankingClient.ts index 822bdc79007c..71edddd4a50f 100644 --- a/clients/client-kendra-ranking/src/KendraRankingClient.ts +++ b/clients/client-kendra-ranking/src/KendraRankingClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -122,11 +122,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kendra-ranking/src/runtimeConfig.browser.ts b/clients/client-kendra-ranking/src/runtimeConfig.browser.ts index 266c108229c2..4a5b827d269d 100644 --- a/clients/client-kendra-ranking/src/runtimeConfig.browser.ts +++ b/clients/client-kendra-ranking/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KendraRankingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kendra-ranking/src/runtimeConfig.ts b/clients/client-kendra-ranking/src/runtimeConfig.ts index 03dd1a3bbc56..b5ee45d29441 100644 --- a/clients/client-kendra-ranking/src/runtimeConfig.ts +++ b/clients/client-kendra-ranking/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KendraRankingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kendra/package.json b/clients/client-kendra/package.json index 9eff47b4eed0..d9cc3de01cf1 100644 --- a/clients/client-kendra/package.json +++ b/clients/client-kendra/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-kendra/src/KendraClient.ts b/clients/client-kendra/src/KendraClient.ts index b8cd16c94a26..19c2ead87fb7 100644 --- a/clients/client-kendra/src/KendraClient.ts +++ b/clients/client-kendra/src/KendraClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -377,11 +377,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kendra/src/runtimeConfig.browser.ts b/clients/client-kendra/src/runtimeConfig.browser.ts index de0f69b6f872..0937b9e3ca47 100644 --- a/clients/client-kendra/src/runtimeConfig.browser.ts +++ b/clients/client-kendra/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KendraClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kendra/src/runtimeConfig.ts b/clients/client-kendra/src/runtimeConfig.ts index c382298c0a2c..7f194c683449 100644 --- a/clients/client-kendra/src/runtimeConfig.ts +++ b/clients/client-kendra/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KendraClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-keyspaces/package.json b/clients/client-keyspaces/package.json index 8c934988c2f3..d7c148975560 100644 --- a/clients/client-keyspaces/package.json +++ b/clients/client-keyspaces/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-keyspaces/src/KeyspacesClient.ts b/clients/client-keyspaces/src/KeyspacesClient.ts index bfd3cc59239c..bf2be4992a12 100644 --- a/clients/client-keyspaces/src/KeyspacesClient.ts +++ b/clients/client-keyspaces/src/KeyspacesClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -125,11 +125,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-keyspaces/src/runtimeConfig.browser.ts b/clients/client-keyspaces/src/runtimeConfig.browser.ts index 7fca4d7f2b2b..92c98b8b2b25 100644 --- a/clients/client-keyspaces/src/runtimeConfig.browser.ts +++ b/clients/client-keyspaces/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KeyspacesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-keyspaces/src/runtimeConfig.ts b/clients/client-keyspaces/src/runtimeConfig.ts index de5d52da62d3..e1b5027a94c5 100644 --- a/clients/client-keyspaces/src/runtimeConfig.ts +++ b/clients/client-keyspaces/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KeyspacesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kinesis-analytics-v2/package.json b/clients/client-kinesis-analytics-v2/package.json index 41efb1e4da2a..5f8a339271e9 100644 --- a/clients/client-kinesis-analytics-v2/package.json +++ b/clients/client-kinesis-analytics-v2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kinesis-analytics-v2/src/KinesisAnalyticsV2Client.ts b/clients/client-kinesis-analytics-v2/src/KinesisAnalyticsV2Client.ts index b4e8049b6b24..7dbb2b40e09a 100644 --- a/clients/client-kinesis-analytics-v2/src/KinesisAnalyticsV2Client.ts +++ b/clients/client-kinesis-analytics-v2/src/KinesisAnalyticsV2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -239,11 +239,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kinesis-analytics-v2/src/runtimeConfig.browser.ts b/clients/client-kinesis-analytics-v2/src/runtimeConfig.browser.ts index 0807f46f411f..7bc57a518fe6 100644 --- a/clients/client-kinesis-analytics-v2/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-analytics-v2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KinesisAnalyticsV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kinesis-analytics-v2/src/runtimeConfig.ts b/clients/client-kinesis-analytics-v2/src/runtimeConfig.ts index f57739591e28..9395e9d9f4b7 100644 --- a/clients/client-kinesis-analytics-v2/src/runtimeConfig.ts +++ b/clients/client-kinesis-analytics-v2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KinesisAnalyticsV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kinesis-analytics/package.json b/clients/client-kinesis-analytics/package.json index 7bc54b8b46d0..ce4a7cfbba2d 100644 --- a/clients/client-kinesis-analytics/package.json +++ b/clients/client-kinesis-analytics/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kinesis-analytics/src/KinesisAnalyticsClient.ts b/clients/client-kinesis-analytics/src/KinesisAnalyticsClient.ts index 0f4367cab4ec..b1f71878f5c2 100644 --- a/clients/client-kinesis-analytics/src/KinesisAnalyticsClient.ts +++ b/clients/client-kinesis-analytics/src/KinesisAnalyticsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -173,11 +173,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kinesis-analytics/src/runtimeConfig.browser.ts b/clients/client-kinesis-analytics/src/runtimeConfig.browser.ts index a198544c1225..f8de4a6e2fe8 100644 --- a/clients/client-kinesis-analytics/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-analytics/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KinesisAnalyticsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kinesis-analytics/src/runtimeConfig.ts b/clients/client-kinesis-analytics/src/runtimeConfig.ts index d0ae00ead84a..dc33cb44011c 100644 --- a/clients/client-kinesis-analytics/src/runtimeConfig.ts +++ b/clients/client-kinesis-analytics/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KinesisAnalyticsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kinesis-video-archived-media/package.json b/clients/client-kinesis-video-archived-media/package.json index 10b9ff714a56..ce066e5da40f 100644 --- a/clients/client-kinesis-video-archived-media/package.json +++ b/clients/client-kinesis-video-archived-media/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kinesis-video-archived-media/src/KinesisVideoArchivedMediaClient.ts b/clients/client-kinesis-video-archived-media/src/KinesisVideoArchivedMediaClient.ts index 02b04e29e0b2..91bcb652438c 100644 --- a/clients/client-kinesis-video-archived-media/src/KinesisVideoArchivedMediaClient.ts +++ b/clients/client-kinesis-video-archived-media/src/KinesisVideoArchivedMediaClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -105,11 +105,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kinesis-video-archived-media/src/runtimeConfig.browser.ts b/clients/client-kinesis-video-archived-media/src/runtimeConfig.browser.ts index ba8c3ed60a3e..753677a3956b 100644 --- a/clients/client-kinesis-video-archived-media/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-archived-media/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KinesisVideoArchivedMediaClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kinesis-video-archived-media/src/runtimeConfig.ts b/clients/client-kinesis-video-archived-media/src/runtimeConfig.ts index 554bf726e68a..5fb74d297ad9 100644 --- a/clients/client-kinesis-video-archived-media/src/runtimeConfig.ts +++ b/clients/client-kinesis-video-archived-media/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KinesisVideoArchivedMediaClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kinesis-video-media/package.json b/clients/client-kinesis-video-media/package.json index 6dab2353a611..87241137beb9 100644 --- a/clients/client-kinesis-video-media/package.json +++ b/clients/client-kinesis-video-media/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kinesis-video-media/src/KinesisVideoMediaClient.ts b/clients/client-kinesis-video-media/src/KinesisVideoMediaClient.ts index b294a1635fe7..6d9dd0521c1d 100644 --- a/clients/client-kinesis-video-media/src/KinesisVideoMediaClient.ts +++ b/clients/client-kinesis-video-media/src/KinesisVideoMediaClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -79,11 +79,11 @@ export type ServiceOutputTypes = GetMediaCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kinesis-video-media/src/runtimeConfig.browser.ts b/clients/client-kinesis-video-media/src/runtimeConfig.browser.ts index 13cdbbf59b3d..779e0f81785e 100644 --- a/clients/client-kinesis-video-media/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-media/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KinesisVideoMediaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kinesis-video-media/src/runtimeConfig.ts b/clients/client-kinesis-video-media/src/runtimeConfig.ts index 7ac1db253d54..01e8af01d13f 100644 --- a/clients/client-kinesis-video-media/src/runtimeConfig.ts +++ b/clients/client-kinesis-video-media/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KinesisVideoMediaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kinesis-video-signaling/package.json b/clients/client-kinesis-video-signaling/package.json index dc467d4156fa..3f9d8c66af71 100644 --- a/clients/client-kinesis-video-signaling/package.json +++ b/clients/client-kinesis-video-signaling/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kinesis-video-signaling/src/KinesisVideoSignalingClient.ts b/clients/client-kinesis-video-signaling/src/KinesisVideoSignalingClient.ts index f2b84292140a..e45d92a87976 100644 --- a/clients/client-kinesis-video-signaling/src/KinesisVideoSignalingClient.ts +++ b/clients/client-kinesis-video-signaling/src/KinesisVideoSignalingClient.ts @@ -28,7 +28,7 @@ import { RetryInputConfig, RetryResolvedConfig, } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -88,11 +88,11 @@ export type ServiceOutputTypes = GetIceServerConfigCommandOutput | SendAlexaOffe /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kinesis-video-signaling/src/runtimeConfig.browser.ts b/clients/client-kinesis-video-signaling/src/runtimeConfig.browser.ts index 8ff89255d8fb..4704f0e1f877 100644 --- a/clients/client-kinesis-video-signaling/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-signaling/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KinesisVideoSignalingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kinesis-video-signaling/src/runtimeConfig.ts b/clients/client-kinesis-video-signaling/src/runtimeConfig.ts index ff4978deb53f..f860788e2ac7 100644 --- a/clients/client-kinesis-video-signaling/src/runtimeConfig.ts +++ b/clients/client-kinesis-video-signaling/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KinesisVideoSignalingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kinesis-video-webrtc-storage/package.json b/clients/client-kinesis-video-webrtc-storage/package.json index d8078be57b2b..47f2339a4138 100644 --- a/clients/client-kinesis-video-webrtc-storage/package.json +++ b/clients/client-kinesis-video-webrtc-storage/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kinesis-video-webrtc-storage/src/KinesisVideoWebRTCStorageClient.ts b/clients/client-kinesis-video-webrtc-storage/src/KinesisVideoWebRTCStorageClient.ts index 6cf90416aed2..9a2bb38f20f8 100644 --- a/clients/client-kinesis-video-webrtc-storage/src/KinesisVideoWebRTCStorageClient.ts +++ b/clients/client-kinesis-video-webrtc-storage/src/KinesisVideoWebRTCStorageClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -78,11 +78,11 @@ export type ServiceOutputTypes = JoinStorageSessionCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kinesis-video-webrtc-storage/src/runtimeConfig.browser.ts b/clients/client-kinesis-video-webrtc-storage/src/runtimeConfig.browser.ts index 37fb371ce5b6..33387a1b0da8 100644 --- a/clients/client-kinesis-video-webrtc-storage/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-webrtc-storage/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KinesisVideoWebRTCStorageClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kinesis-video-webrtc-storage/src/runtimeConfig.ts b/clients/client-kinesis-video-webrtc-storage/src/runtimeConfig.ts index e06bbb3237ef..bf6f71b6009a 100644 --- a/clients/client-kinesis-video-webrtc-storage/src/runtimeConfig.ts +++ b/clients/client-kinesis-video-webrtc-storage/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KinesisVideoWebRTCStorageClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kinesis-video/package.json b/clients/client-kinesis-video/package.json index 11e8a1062819..9198a8677a95 100644 --- a/clients/client-kinesis-video/package.json +++ b/clients/client-kinesis-video/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kinesis-video/src/KinesisVideoClient.ts b/clients/client-kinesis-video/src/KinesisVideoClient.ts index f7de54a4aaa3..b76bf8e605dd 100644 --- a/clients/client-kinesis-video/src/KinesisVideoClient.ts +++ b/clients/client-kinesis-video/src/KinesisVideoClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -224,11 +224,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kinesis-video/src/runtimeConfig.browser.ts b/clients/client-kinesis-video/src/runtimeConfig.browser.ts index 6fcaa513bd37..caa3ee346d23 100644 --- a/clients/client-kinesis-video/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KinesisVideoClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kinesis-video/src/runtimeConfig.ts b/clients/client-kinesis-video/src/runtimeConfig.ts index df7896cec12d..7d792f08aa36 100644 --- a/clients/client-kinesis-video/src/runtimeConfig.ts +++ b/clients/client-kinesis-video/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KinesisVideoClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kinesis/package.json b/clients/client-kinesis/package.json index ac0d0d352706..d14254e0a2a2 100644 --- a/clients/client-kinesis/package.json +++ b/clients/client-kinesis/package.json @@ -33,35 +33,35 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-kinesis/src/KinesisClient.ts b/clients/client-kinesis/src/KinesisClient.ts index 7ec7983ba026..afcd2b456fb5 100644 --- a/clients/client-kinesis/src/KinesisClient.ts +++ b/clients/client-kinesis/src/KinesisClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -218,11 +218,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kinesis/src/runtimeConfig.browser.ts b/clients/client-kinesis/src/runtimeConfig.browser.ts index e9f29a47e88e..39fc026637b0 100644 --- a/clients/client-kinesis/src/runtimeConfig.browser.ts +++ b/clients/client-kinesis/src/runtimeConfig.browser.ts @@ -36,7 +36,7 @@ export const getRuntimeConfig = (config: KinesisClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kinesis/src/runtimeConfig.ts b/clients/client-kinesis/src/runtimeConfig.ts index 337ee2eeaa4a..1660d2cc18e7 100644 --- a/clients/client-kinesis/src/runtimeConfig.ts +++ b/clients/client-kinesis/src/runtimeConfig.ts @@ -46,9 +46,9 @@ export const getRuntimeConfig = (config: KinesisClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: - config?.requestHandler ?? - new RequestHandler(async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })), + requestHandler: RequestHandler.create( + config?.requestHandler ?? (async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })) + ), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-kms/package.json b/clients/client-kms/package.json index 967ed07c5663..02cb2335ee85 100644 --- a/clients/client-kms/package.json +++ b/clients/client-kms/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-kms/src/KMSClient.ts b/clients/client-kms/src/KMSClient.ts index ffee9e0091f4..849f1721285d 100644 --- a/clients/client-kms/src/KMSClient.ts +++ b/clients/client-kms/src/KMSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -275,11 +275,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-kms/src/runtimeConfig.browser.ts b/clients/client-kms/src/runtimeConfig.browser.ts index 1897c63d244b..7d8ddacad6ac 100644 --- a/clients/client-kms/src/runtimeConfig.browser.ts +++ b/clients/client-kms/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: KMSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-kms/src/runtimeConfig.ts b/clients/client-kms/src/runtimeConfig.ts index d2fd60548d1f..53f059127515 100644 --- a/clients/client-kms/src/runtimeConfig.ts +++ b/clients/client-kms/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: KMSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lakeformation/package.json b/clients/client-lakeformation/package.json index 21af497acfab..44a060315ac8 100644 --- a/clients/client-lakeformation/package.json +++ b/clients/client-lakeformation/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-lakeformation/src/LakeFormationClient.ts b/clients/client-lakeformation/src/LakeFormationClient.ts index 2fa922cc6122..8172fe08fc60 100644 --- a/clients/client-lakeformation/src/LakeFormationClient.ts +++ b/clients/client-lakeformation/src/LakeFormationClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -321,11 +321,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lakeformation/src/runtimeConfig.browser.ts b/clients/client-lakeformation/src/runtimeConfig.browser.ts index 0c47f214e772..3c2eb316837f 100644 --- a/clients/client-lakeformation/src/runtimeConfig.browser.ts +++ b/clients/client-lakeformation/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LakeFormationClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lakeformation/src/runtimeConfig.ts b/clients/client-lakeformation/src/runtimeConfig.ts index 5d0327d19efe..39bb69afc8e3 100644 --- a/clients/client-lakeformation/src/runtimeConfig.ts +++ b/clients/client-lakeformation/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LakeFormationClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lambda/package.json b/clients/client-lambda/package.json index d84fad6cdb57..ea3c435519cb 100644 --- a/clients/client-lambda/package.json +++ b/clients/client-lambda/package.json @@ -32,36 +32,36 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-lambda/src/LambdaClient.ts b/clients/client-lambda/src/LambdaClient.ts index 32ded09fa786..cb692a3a4490 100644 --- a/clients/client-lambda/src/LambdaClient.ts +++ b/clients/client-lambda/src/LambdaClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -407,11 +407,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lambda/src/runtimeConfig.browser.ts b/clients/client-lambda/src/runtimeConfig.browser.ts index 2a3e80740d84..6b0e803c6eff 100644 --- a/clients/client-lambda/src/runtimeConfig.browser.ts +++ b/clients/client-lambda/src/runtimeConfig.browser.ts @@ -36,7 +36,7 @@ export const getRuntimeConfig = (config: LambdaClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lambda/src/runtimeConfig.ts b/clients/client-lambda/src/runtimeConfig.ts index 58bdab2040c0..c865e101f51e 100644 --- a/clients/client-lambda/src/runtimeConfig.ts +++ b/clients/client-lambda/src/runtimeConfig.ts @@ -46,7 +46,7 @@ export const getRuntimeConfig = (config: LambdaClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-launch-wizard/package.json b/clients/client-launch-wizard/package.json index 24961a6fa891..b9626a44a484 100644 --- a/clients/client-launch-wizard/package.json +++ b/clients/client-launch-wizard/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-launch-wizard/src/LaunchWizardClient.ts b/clients/client-launch-wizard/src/LaunchWizardClient.ts index de0ac1edd177..1dcfa685c215 100644 --- a/clients/client-launch-wizard/src/LaunchWizardClient.ts +++ b/clients/client-launch-wizard/src/LaunchWizardClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -107,11 +107,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-launch-wizard/src/runtimeConfig.browser.ts b/clients/client-launch-wizard/src/runtimeConfig.browser.ts index fea176f58895..8593bfc46a61 100644 --- a/clients/client-launch-wizard/src/runtimeConfig.browser.ts +++ b/clients/client-launch-wizard/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LaunchWizardClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-launch-wizard/src/runtimeConfig.ts b/clients/client-launch-wizard/src/runtimeConfig.ts index 6ab49dab6923..edd2cfc41b26 100644 --- a/clients/client-launch-wizard/src/runtimeConfig.ts +++ b/clients/client-launch-wizard/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LaunchWizardClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lex-model-building-service/package.json b/clients/client-lex-model-building-service/package.json index f27cd2360dd1..412bb129f423 100644 --- a/clients/client-lex-model-building-service/package.json +++ b/clients/client-lex-model-building-service/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-lex-model-building-service/src/LexModelBuildingServiceClient.ts b/clients/client-lex-model-building-service/src/LexModelBuildingServiceClient.ts index 940cbffd6d1d..8a759adfc483 100644 --- a/clients/client-lex-model-building-service/src/LexModelBuildingServiceClient.ts +++ b/clients/client-lex-model-building-service/src/LexModelBuildingServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -233,11 +233,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lex-model-building-service/src/runtimeConfig.browser.ts b/clients/client-lex-model-building-service/src/runtimeConfig.browser.ts index 8d122a69ee8f..3c54281e5bd3 100644 --- a/clients/client-lex-model-building-service/src/runtimeConfig.browser.ts +++ b/clients/client-lex-model-building-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LexModelBuildingServiceClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lex-model-building-service/src/runtimeConfig.ts b/clients/client-lex-model-building-service/src/runtimeConfig.ts index d82f587d187c..3ceb3063b96e 100644 --- a/clients/client-lex-model-building-service/src/runtimeConfig.ts +++ b/clients/client-lex-model-building-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LexModelBuildingServiceClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lex-models-v2/package.json b/clients/client-lex-models-v2/package.json index 97b5980464bb..1aa96279958d 100644 --- a/clients/client-lex-models-v2/package.json +++ b/clients/client-lex-models-v2/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-lex-models-v2/src/LexModelsV2Client.ts b/clients/client-lex-models-v2/src/LexModelsV2Client.ts index c4c6d49635ec..bc17103b43ff 100644 --- a/clients/client-lex-models-v2/src/LexModelsV2Client.ts +++ b/clients/client-lex-models-v2/src/LexModelsV2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -497,11 +497,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lex-models-v2/src/runtimeConfig.browser.ts b/clients/client-lex-models-v2/src/runtimeConfig.browser.ts index ec203315abdd..f51e5caa358d 100644 --- a/clients/client-lex-models-v2/src/runtimeConfig.browser.ts +++ b/clients/client-lex-models-v2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LexModelsV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lex-models-v2/src/runtimeConfig.ts b/clients/client-lex-models-v2/src/runtimeConfig.ts index daaf36722f8c..d531a4bae108 100644 --- a/clients/client-lex-models-v2/src/runtimeConfig.ts +++ b/clients/client-lex-models-v2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LexModelsV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lex-runtime-service/package.json b/clients/client-lex-runtime-service/package.json index a2366aef5f59..4ec52a84db8d 100644 --- a/clients/client-lex-runtime-service/package.json +++ b/clients/client-lex-runtime-service/package.json @@ -34,31 +34,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-lex-runtime-service/src/LexRuntimeServiceClient.ts b/clients/client-lex-runtime-service/src/LexRuntimeServiceClient.ts index c8b89bb92e76..50cb4092554a 100644 --- a/clients/client-lex-runtime-service/src/LexRuntimeServiceClient.ts +++ b/clients/client-lex-runtime-service/src/LexRuntimeServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -93,11 +93,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lex-runtime-service/src/runtimeConfig.browser.ts b/clients/client-lex-runtime-service/src/runtimeConfig.browser.ts index 3ff738b55226..82838eaf868f 100644 --- a/clients/client-lex-runtime-service/src/runtimeConfig.browser.ts +++ b/clients/client-lex-runtime-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LexRuntimeServiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lex-runtime-service/src/runtimeConfig.ts b/clients/client-lex-runtime-service/src/runtimeConfig.ts index 940c57206e60..8990ac1ba50a 100644 --- a/clients/client-lex-runtime-service/src/runtimeConfig.ts +++ b/clients/client-lex-runtime-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LexRuntimeServiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lex-runtime-v2/package.json b/clients/client-lex-runtime-v2/package.json index 449cf6f95c16..a49e27608041 100644 --- a/clients/client-lex-runtime-v2/package.json +++ b/clients/client-lex-runtime-v2/package.json @@ -35,33 +35,33 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-lex-runtime-v2/src/LexRuntimeV2Client.ts b/clients/client-lex-runtime-v2/src/LexRuntimeV2Client.ts index 2ae437ca9cfe..fda1cb4f72a4 100644 --- a/clients/client-lex-runtime-v2/src/LexRuntimeV2Client.ts +++ b/clients/client-lex-runtime-v2/src/LexRuntimeV2Client.ts @@ -37,7 +37,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -105,11 +105,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lex-runtime-v2/src/runtimeConfig.browser.ts b/clients/client-lex-runtime-v2/src/runtimeConfig.browser.ts index 128d6943e4cb..b04dd8186fff 100644 --- a/clients/client-lex-runtime-v2/src/runtimeConfig.browser.ts +++ b/clients/client-lex-runtime-v2/src/runtimeConfig.browser.ts @@ -39,7 +39,7 @@ export const getRuntimeConfig = (config: LexRuntimeV2ClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lex-runtime-v2/src/runtimeConfig.ts b/clients/client-lex-runtime-v2/src/runtimeConfig.ts index 4cf39d19b8a5..efc2a0b12f6d 100644 --- a/clients/client-lex-runtime-v2/src/runtimeConfig.ts +++ b/clients/client-lex-runtime-v2/src/runtimeConfig.ts @@ -48,9 +48,9 @@ export const getRuntimeConfig = (config: LexRuntimeV2ClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: - config?.requestHandler ?? - new RequestHandler(async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })), + requestHandler: RequestHandler.create( + config?.requestHandler ?? (async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })) + ), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-license-manager-linux-subscriptions/package.json b/clients/client-license-manager-linux-subscriptions/package.json index 4179c3f748f1..9ba8adbf9038 100644 --- a/clients/client-license-manager-linux-subscriptions/package.json +++ b/clients/client-license-manager-linux-subscriptions/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-license-manager-linux-subscriptions/src/LicenseManagerLinuxSubscriptionsClient.ts b/clients/client-license-manager-linux-subscriptions/src/LicenseManagerLinuxSubscriptionsClient.ts index 0e2d0f46990f..4cc1a174627b 100644 --- a/clients/client-license-manager-linux-subscriptions/src/LicenseManagerLinuxSubscriptionsClient.ts +++ b/clients/client-license-manager-linux-subscriptions/src/LicenseManagerLinuxSubscriptionsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -98,11 +98,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-license-manager-linux-subscriptions/src/runtimeConfig.browser.ts b/clients/client-license-manager-linux-subscriptions/src/runtimeConfig.browser.ts index 00bf7a14ef10..5eb53cdb3e5e 100644 --- a/clients/client-license-manager-linux-subscriptions/src/runtimeConfig.browser.ts +++ b/clients/client-license-manager-linux-subscriptions/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LicenseManagerLinuxSubscriptionsClientC defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-license-manager-linux-subscriptions/src/runtimeConfig.ts b/clients/client-license-manager-linux-subscriptions/src/runtimeConfig.ts index c19c714614e3..905be6623c6d 100644 --- a/clients/client-license-manager-linux-subscriptions/src/runtimeConfig.ts +++ b/clients/client-license-manager-linux-subscriptions/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LicenseManagerLinuxSubscriptionsClientC defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-license-manager-user-subscriptions/package.json b/clients/client-license-manager-user-subscriptions/package.json index 84887c33e6d2..0d20b39e7077 100644 --- a/clients/client-license-manager-user-subscriptions/package.json +++ b/clients/client-license-manager-user-subscriptions/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-license-manager-user-subscriptions/src/LicenseManagerUserSubscriptionsClient.ts b/clients/client-license-manager-user-subscriptions/src/LicenseManagerUserSubscriptionsClient.ts index c742a96360e7..114b506838d3 100644 --- a/clients/client-license-manager-user-subscriptions/src/LicenseManagerUserSubscriptionsClient.ts +++ b/clients/client-license-manager-user-subscriptions/src/LicenseManagerUserSubscriptionsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -134,11 +134,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-license-manager-user-subscriptions/src/runtimeConfig.browser.ts b/clients/client-license-manager-user-subscriptions/src/runtimeConfig.browser.ts index 9173b4f6e07b..cbc15d47932e 100644 --- a/clients/client-license-manager-user-subscriptions/src/runtimeConfig.browser.ts +++ b/clients/client-license-manager-user-subscriptions/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LicenseManagerUserSubscriptionsClientCo defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-license-manager-user-subscriptions/src/runtimeConfig.ts b/clients/client-license-manager-user-subscriptions/src/runtimeConfig.ts index 11c80844e28a..60c58255376b 100644 --- a/clients/client-license-manager-user-subscriptions/src/runtimeConfig.ts +++ b/clients/client-license-manager-user-subscriptions/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LicenseManagerUserSubscriptionsClientCo defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-license-manager/package.json b/clients/client-license-manager/package.json index 9490923dd1c9..d919898d7b42 100644 --- a/clients/client-license-manager/package.json +++ b/clients/client-license-manager/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-license-manager/src/LicenseManagerClient.ts b/clients/client-license-manager/src/LicenseManagerClient.ts index ea2d393b2293..11d6bc3dcd71 100644 --- a/clients/client-license-manager/src/LicenseManagerClient.ts +++ b/clients/client-license-manager/src/LicenseManagerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -314,11 +314,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-license-manager/src/runtimeConfig.browser.ts b/clients/client-license-manager/src/runtimeConfig.browser.ts index c40fe00cbf5e..791231112d4a 100644 --- a/clients/client-license-manager/src/runtimeConfig.browser.ts +++ b/clients/client-license-manager/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LicenseManagerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-license-manager/src/runtimeConfig.ts b/clients/client-license-manager/src/runtimeConfig.ts index de3001db0aff..0bc8316021ee 100644 --- a/clients/client-license-manager/src/runtimeConfig.ts +++ b/clients/client-license-manager/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LicenseManagerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lightsail/package.json b/clients/client-lightsail/package.json index 702d38b43c37..01d82fadada6 100644 --- a/clients/client-lightsail/package.json +++ b/clients/client-lightsail/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-lightsail/src/LightsailClient.ts b/clients/client-lightsail/src/LightsailClient.ts index b00a40fde023..8c2d802130ff 100644 --- a/clients/client-lightsail/src/LightsailClient.ts +++ b/clients/client-lightsail/src/LightsailClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -794,11 +794,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lightsail/src/runtimeConfig.browser.ts b/clients/client-lightsail/src/runtimeConfig.browser.ts index f2fdeda0c151..4c857004ca8b 100644 --- a/clients/client-lightsail/src/runtimeConfig.browser.ts +++ b/clients/client-lightsail/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LightsailClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lightsail/src/runtimeConfig.ts b/clients/client-lightsail/src/runtimeConfig.ts index d4cdd76e758a..9ab97383b491 100644 --- a/clients/client-lightsail/src/runtimeConfig.ts +++ b/clients/client-lightsail/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LightsailClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-location/package.json b/clients/client-location/package.json index ff6ddbe88b2b..1a31f9e557a4 100644 --- a/clients/client-location/package.json +++ b/clients/client-location/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-location/src/LocationClient.ts b/clients/client-location/src/LocationClient.ts index c7686c51feaf..880d832db5c3 100644 --- a/clients/client-location/src/LocationClient.ts +++ b/clients/client-location/src/LocationClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -329,11 +329,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-location/src/runtimeConfig.browser.ts b/clients/client-location/src/runtimeConfig.browser.ts index 7ebcdc45be39..05eca9b55d5d 100644 --- a/clients/client-location/src/runtimeConfig.browser.ts +++ b/clients/client-location/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LocationClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-location/src/runtimeConfig.ts b/clients/client-location/src/runtimeConfig.ts index ecebd13251dd..513fd248df0e 100644 --- a/clients/client-location/src/runtimeConfig.ts +++ b/clients/client-location/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LocationClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lookoutequipment/package.json b/clients/client-lookoutequipment/package.json index a3316f73271d..5a42df2fed17 100644 --- a/clients/client-lookoutequipment/package.json +++ b/clients/client-lookoutequipment/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-lookoutequipment/src/LookoutEquipmentClient.ts b/clients/client-lookoutequipment/src/LookoutEquipmentClient.ts index 0983015fafbe..eafbe77e311f 100644 --- a/clients/client-lookoutequipment/src/LookoutEquipmentClient.ts +++ b/clients/client-lookoutequipment/src/LookoutEquipmentClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -299,11 +299,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lookoutequipment/src/runtimeConfig.browser.ts b/clients/client-lookoutequipment/src/runtimeConfig.browser.ts index da59534e4ebe..0e2360f9050d 100644 --- a/clients/client-lookoutequipment/src/runtimeConfig.browser.ts +++ b/clients/client-lookoutequipment/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LookoutEquipmentClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lookoutequipment/src/runtimeConfig.ts b/clients/client-lookoutequipment/src/runtimeConfig.ts index 926c8cc6cbad..4216a833a821 100644 --- a/clients/client-lookoutequipment/src/runtimeConfig.ts +++ b/clients/client-lookoutequipment/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LookoutEquipmentClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lookoutmetrics/package.json b/clients/client-lookoutmetrics/package.json index eac963c3972d..4bc724881c8c 100644 --- a/clients/client-lookoutmetrics/package.json +++ b/clients/client-lookoutmetrics/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-lookoutmetrics/src/LookoutMetricsClient.ts b/clients/client-lookoutmetrics/src/LookoutMetricsClient.ts index 1b386e3b4312..acac154bac4c 100644 --- a/clients/client-lookoutmetrics/src/LookoutMetricsClient.ts +++ b/clients/client-lookoutmetrics/src/LookoutMetricsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -212,11 +212,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lookoutmetrics/src/runtimeConfig.browser.ts b/clients/client-lookoutmetrics/src/runtimeConfig.browser.ts index 09619e675580..8fdf88c7738b 100644 --- a/clients/client-lookoutmetrics/src/runtimeConfig.browser.ts +++ b/clients/client-lookoutmetrics/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LookoutMetricsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lookoutmetrics/src/runtimeConfig.ts b/clients/client-lookoutmetrics/src/runtimeConfig.ts index 93a9b54819d2..0d5f4a45dbb7 100644 --- a/clients/client-lookoutmetrics/src/runtimeConfig.ts +++ b/clients/client-lookoutmetrics/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LookoutMetricsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-lookoutvision/package.json b/clients/client-lookoutvision/package.json index 75794d0da688..42008353a1e1 100644 --- a/clients/client-lookoutvision/package.json +++ b/clients/client-lookoutvision/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-lookoutvision/src/LookoutVisionClient.ts b/clients/client-lookoutvision/src/LookoutVisionClient.ts index 508743c40aa9..28a146a6cd40 100644 --- a/clients/client-lookoutvision/src/LookoutVisionClient.ts +++ b/clients/client-lookoutvision/src/LookoutVisionClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -158,11 +158,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-lookoutvision/src/runtimeConfig.browser.ts b/clients/client-lookoutvision/src/runtimeConfig.browser.ts index 1aad6704f023..c4dc02910f1c 100644 --- a/clients/client-lookoutvision/src/runtimeConfig.browser.ts +++ b/clients/client-lookoutvision/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: LookoutVisionClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-lookoutvision/src/runtimeConfig.ts b/clients/client-lookoutvision/src/runtimeConfig.ts index 8c6a04079142..0b1b6785e9f5 100644 --- a/clients/client-lookoutvision/src/runtimeConfig.ts +++ b/clients/client-lookoutvision/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: LookoutVisionClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-m2/package.json b/clients/client-m2/package.json index 61030a91025a..33ae4a2b7f57 100644 --- a/clients/client-m2/package.json +++ b/clients/client-m2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-m2/src/M2Client.ts b/clients/client-m2/src/M2Client.ts index ef9e35887d89..3890c7a0ea82 100644 --- a/clients/client-m2/src/M2Client.ts +++ b/clients/client-m2/src/M2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -212,11 +212,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-m2/src/runtimeConfig.browser.ts b/clients/client-m2/src/runtimeConfig.browser.ts index e91a9e819319..7836ad38c19b 100644 --- a/clients/client-m2/src/runtimeConfig.browser.ts +++ b/clients/client-m2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: M2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-m2/src/runtimeConfig.ts b/clients/client-m2/src/runtimeConfig.ts index 185a975b1441..386827919d8c 100644 --- a/clients/client-m2/src/runtimeConfig.ts +++ b/clients/client-m2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: M2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-machine-learning/package.json b/clients/client-machine-learning/package.json index 4d7228007f1c..ba0c63c9a579 100644 --- a/clients/client-machine-learning/package.json +++ b/clients/client-machine-learning/package.json @@ -33,32 +33,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-machine-learning/src/MachineLearningClient.ts b/clients/client-machine-learning/src/MachineLearningClient.ts index 24815fe81dea..fe292c20a160 100644 --- a/clients/client-machine-learning/src/MachineLearningClient.ts +++ b/clients/client-machine-learning/src/MachineLearningClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -194,11 +194,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-machine-learning/src/runtimeConfig.browser.ts b/clients/client-machine-learning/src/runtimeConfig.browser.ts index 60bea68f9602..2924c389c359 100644 --- a/clients/client-machine-learning/src/runtimeConfig.browser.ts +++ b/clients/client-machine-learning/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MachineLearningClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-machine-learning/src/runtimeConfig.ts b/clients/client-machine-learning/src/runtimeConfig.ts index d5822bfc145e..ceacbee859a9 100644 --- a/clients/client-machine-learning/src/runtimeConfig.ts +++ b/clients/client-machine-learning/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MachineLearningClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-macie2/package.json b/clients/client-macie2/package.json index a0ff92c3ff05..dd9e9b54debc 100644 --- a/clients/client-macie2/package.json +++ b/clients/client-macie2/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-macie2/src/Macie2Client.ts b/clients/client-macie2/src/Macie2Client.ts index a5123b8553aa..f5ffab2c205c 100644 --- a/clients/client-macie2/src/Macie2Client.ts +++ b/clients/client-macie2/src/Macie2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -461,11 +461,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-macie2/src/runtimeConfig.browser.ts b/clients/client-macie2/src/runtimeConfig.browser.ts index c1ec8d143618..0d4803fcbd9c 100644 --- a/clients/client-macie2/src/runtimeConfig.browser.ts +++ b/clients/client-macie2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: Macie2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-macie2/src/runtimeConfig.ts b/clients/client-macie2/src/runtimeConfig.ts index c823e946f692..f1ed3c42ceea 100644 --- a/clients/client-macie2/src/runtimeConfig.ts +++ b/clients/client-macie2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: Macie2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-managedblockchain-query/package.json b/clients/client-managedblockchain-query/package.json index addfdbdc9982..4d4fd5496350 100644 --- a/clients/client-managedblockchain-query/package.json +++ b/clients/client-managedblockchain-query/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-managedblockchain-query/src/ManagedBlockchainQueryClient.ts b/clients/client-managedblockchain-query/src/ManagedBlockchainQueryClient.ts index 879ff16dcc50..a4c059735942 100644 --- a/clients/client-managedblockchain-query/src/ManagedBlockchainQueryClient.ts +++ b/clients/client-managedblockchain-query/src/ManagedBlockchainQueryClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -107,11 +107,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-managedblockchain-query/src/runtimeConfig.browser.ts b/clients/client-managedblockchain-query/src/runtimeConfig.browser.ts index 79a0f8d04838..6d89c9d74e90 100644 --- a/clients/client-managedblockchain-query/src/runtimeConfig.browser.ts +++ b/clients/client-managedblockchain-query/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ManagedBlockchainQueryClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-managedblockchain-query/src/runtimeConfig.ts b/clients/client-managedblockchain-query/src/runtimeConfig.ts index c1c0c3af7200..fbb3d26ba176 100644 --- a/clients/client-managedblockchain-query/src/runtimeConfig.ts +++ b/clients/client-managedblockchain-query/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ManagedBlockchainQueryClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-managedblockchain/package.json b/clients/client-managedblockchain/package.json index b3c4307e5455..1ca0282afcd4 100644 --- a/clients/client-managedblockchain/package.json +++ b/clients/client-managedblockchain/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-managedblockchain/src/ManagedBlockchainClient.ts b/clients/client-managedblockchain/src/ManagedBlockchainClient.ts index f4f9600da121..72ba92bd0544 100644 --- a/clients/client-managedblockchain/src/ManagedBlockchainClient.ts +++ b/clients/client-managedblockchain/src/ManagedBlockchainClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -161,11 +161,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-managedblockchain/src/runtimeConfig.browser.ts b/clients/client-managedblockchain/src/runtimeConfig.browser.ts index 1c7b39231c27..922e43ef107b 100644 --- a/clients/client-managedblockchain/src/runtimeConfig.browser.ts +++ b/clients/client-managedblockchain/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ManagedBlockchainClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-managedblockchain/src/runtimeConfig.ts b/clients/client-managedblockchain/src/runtimeConfig.ts index 47460e0b7794..2543f40dbac9 100644 --- a/clients/client-managedblockchain/src/runtimeConfig.ts +++ b/clients/client-managedblockchain/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ManagedBlockchainClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-marketplace-agreement/package.json b/clients/client-marketplace-agreement/package.json index faa01e763e08..cf36d3ce5c72 100644 --- a/clients/client-marketplace-agreement/package.json +++ b/clients/client-marketplace-agreement/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-marketplace-agreement/src/MarketplaceAgreementClient.ts b/clients/client-marketplace-agreement/src/MarketplaceAgreementClient.ts index 7ebcfa8c4113..69d8bef3d3cb 100644 --- a/clients/client-marketplace-agreement/src/MarketplaceAgreementClient.ts +++ b/clients/client-marketplace-agreement/src/MarketplaceAgreementClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -86,11 +86,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-marketplace-agreement/src/runtimeConfig.browser.ts b/clients/client-marketplace-agreement/src/runtimeConfig.browser.ts index fb8ef6ca0bf7..76d5afbcdb0e 100644 --- a/clients/client-marketplace-agreement/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-agreement/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MarketplaceAgreementClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-marketplace-agreement/src/runtimeConfig.ts b/clients/client-marketplace-agreement/src/runtimeConfig.ts index 74abc2cdbd27..d916e1690d43 100644 --- a/clients/client-marketplace-agreement/src/runtimeConfig.ts +++ b/clients/client-marketplace-agreement/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MarketplaceAgreementClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-marketplace-catalog/package.json b/clients/client-marketplace-catalog/package.json index f3d4e10a0f65..b144dd4487b8 100644 --- a/clients/client-marketplace-catalog/package.json +++ b/clients/client-marketplace-catalog/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-marketplace-catalog/src/MarketplaceCatalogClient.ts b/clients/client-marketplace-catalog/src/MarketplaceCatalogClient.ts index e43da9548405..02398f317302 100644 --- a/clients/client-marketplace-catalog/src/MarketplaceCatalogClient.ts +++ b/clients/client-marketplace-catalog/src/MarketplaceCatalogClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -125,11 +125,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-marketplace-catalog/src/runtimeConfig.browser.ts b/clients/client-marketplace-catalog/src/runtimeConfig.browser.ts index 86b5d07887f2..e34c0e879dd3 100644 --- a/clients/client-marketplace-catalog/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-catalog/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MarketplaceCatalogClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-marketplace-catalog/src/runtimeConfig.ts b/clients/client-marketplace-catalog/src/runtimeConfig.ts index fc602f17f6ab..3ac74636a72c 100644 --- a/clients/client-marketplace-catalog/src/runtimeConfig.ts +++ b/clients/client-marketplace-catalog/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MarketplaceCatalogClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-marketplace-commerce-analytics/package.json b/clients/client-marketplace-commerce-analytics/package.json index 1997d7c95481..273d0d61baf8 100644 --- a/clients/client-marketplace-commerce-analytics/package.json +++ b/clients/client-marketplace-commerce-analytics/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-marketplace-commerce-analytics/src/MarketplaceCommerceAnalyticsClient.ts b/clients/client-marketplace-commerce-analytics/src/MarketplaceCommerceAnalyticsClient.ts index 4384a02c5a0d..fd6e7698b039 100644 --- a/clients/client-marketplace-commerce-analytics/src/MarketplaceCommerceAnalyticsClient.ts +++ b/clients/client-marketplace-commerce-analytics/src/MarketplaceCommerceAnalyticsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -82,11 +82,11 @@ export type ServiceOutputTypes = GenerateDataSetCommandOutput | StartSupportData /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-marketplace-commerce-analytics/src/runtimeConfig.browser.ts b/clients/client-marketplace-commerce-analytics/src/runtimeConfig.browser.ts index b03fe3e344cc..b09a23fb2cf9 100644 --- a/clients/client-marketplace-commerce-analytics/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-commerce-analytics/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MarketplaceCommerceAnalyticsClientConfi defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-marketplace-commerce-analytics/src/runtimeConfig.ts b/clients/client-marketplace-commerce-analytics/src/runtimeConfig.ts index 1073c6db708e..5e5d48d2a513 100644 --- a/clients/client-marketplace-commerce-analytics/src/runtimeConfig.ts +++ b/clients/client-marketplace-commerce-analytics/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MarketplaceCommerceAnalyticsClientConfi defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-marketplace-deployment/package.json b/clients/client-marketplace-deployment/package.json index d70ab8b6e636..aba322723806 100644 --- a/clients/client-marketplace-deployment/package.json +++ b/clients/client-marketplace-deployment/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-marketplace-deployment/src/MarketplaceDeploymentClient.ts b/clients/client-marketplace-deployment/src/MarketplaceDeploymentClient.ts index 6db747ff42be..3cc0713215d8 100644 --- a/clients/client-marketplace-deployment/src/MarketplaceDeploymentClient.ts +++ b/clients/client-marketplace-deployment/src/MarketplaceDeploymentClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -95,11 +95,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-marketplace-deployment/src/runtimeConfig.browser.ts b/clients/client-marketplace-deployment/src/runtimeConfig.browser.ts index 9682c88e0cfd..3c214140f221 100644 --- a/clients/client-marketplace-deployment/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-deployment/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MarketplaceDeploymentClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-marketplace-deployment/src/runtimeConfig.ts b/clients/client-marketplace-deployment/src/runtimeConfig.ts index afaa15e012c8..145e9ec2373c 100644 --- a/clients/client-marketplace-deployment/src/runtimeConfig.ts +++ b/clients/client-marketplace-deployment/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MarketplaceDeploymentClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-marketplace-entitlement-service/package.json b/clients/client-marketplace-entitlement-service/package.json index cae62e4bd3ad..0b97fd8482cf 100644 --- a/clients/client-marketplace-entitlement-service/package.json +++ b/clients/client-marketplace-entitlement-service/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-marketplace-entitlement-service/src/MarketplaceEntitlementServiceClient.ts b/clients/client-marketplace-entitlement-service/src/MarketplaceEntitlementServiceClient.ts index 8c0b3279872c..8eb28def1e00 100644 --- a/clients/client-marketplace-entitlement-service/src/MarketplaceEntitlementServiceClient.ts +++ b/clients/client-marketplace-entitlement-service/src/MarketplaceEntitlementServiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -78,11 +78,11 @@ export type ServiceOutputTypes = GetEntitlementsCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-marketplace-entitlement-service/src/runtimeConfig.browser.ts b/clients/client-marketplace-entitlement-service/src/runtimeConfig.browser.ts index 2f6d34b70771..9e3647a21065 100644 --- a/clients/client-marketplace-entitlement-service/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-entitlement-service/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MarketplaceEntitlementServiceClientConf defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-marketplace-entitlement-service/src/runtimeConfig.ts b/clients/client-marketplace-entitlement-service/src/runtimeConfig.ts index 1185ef4f0b7d..5a3ad5857942 100644 --- a/clients/client-marketplace-entitlement-service/src/runtimeConfig.ts +++ b/clients/client-marketplace-entitlement-service/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MarketplaceEntitlementServiceClientConf defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-marketplace-metering/package.json b/clients/client-marketplace-metering/package.json index 3680fa0507ea..43f257356c16 100644 --- a/clients/client-marketplace-metering/package.json +++ b/clients/client-marketplace-metering/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-marketplace-metering/src/MarketplaceMeteringClient.ts b/clients/client-marketplace-metering/src/MarketplaceMeteringClient.ts index 7d7b3801265e..ef52afb7054e 100644 --- a/clients/client-marketplace-metering/src/MarketplaceMeteringClient.ts +++ b/clients/client-marketplace-metering/src/MarketplaceMeteringClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -89,11 +89,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-marketplace-metering/src/runtimeConfig.browser.ts b/clients/client-marketplace-metering/src/runtimeConfig.browser.ts index 75da30c00054..5954af3afd34 100644 --- a/clients/client-marketplace-metering/src/runtimeConfig.browser.ts +++ b/clients/client-marketplace-metering/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MarketplaceMeteringClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-marketplace-metering/src/runtimeConfig.ts b/clients/client-marketplace-metering/src/runtimeConfig.ts index 5cb29d5d398c..dbd163218618 100644 --- a/clients/client-marketplace-metering/src/runtimeConfig.ts +++ b/clients/client-marketplace-metering/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MarketplaceMeteringClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mediaconnect/package.json b/clients/client-mediaconnect/package.json index 248f2e271f6f..860d67651b38 100644 --- a/clients/client-mediaconnect/package.json +++ b/clients/client-mediaconnect/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-mediaconnect/src/MediaConnectClient.ts b/clients/client-mediaconnect/src/MediaConnectClient.ts index 06838f8ae4bf..93e39db2deca 100644 --- a/clients/client-mediaconnect/src/MediaConnectClient.ts +++ b/clients/client-mediaconnect/src/MediaConnectClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -275,11 +275,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mediaconnect/src/runtimeConfig.browser.ts b/clients/client-mediaconnect/src/runtimeConfig.browser.ts index 28cf65cd60e3..159686b0e7f8 100644 --- a/clients/client-mediaconnect/src/runtimeConfig.browser.ts +++ b/clients/client-mediaconnect/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MediaConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mediaconnect/src/runtimeConfig.ts b/clients/client-mediaconnect/src/runtimeConfig.ts index d6ec431b86e3..7a6c318504bc 100644 --- a/clients/client-mediaconnect/src/runtimeConfig.ts +++ b/clients/client-mediaconnect/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MediaConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mediaconvert/package.json b/clients/client-mediaconvert/package.json index fe48d929b494..e66a10d648a6 100644 --- a/clients/client-mediaconvert/package.json +++ b/clients/client-mediaconvert/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-mediaconvert/src/MediaConvertClient.ts b/clients/client-mediaconvert/src/MediaConvertClient.ts index 585b146ea769..7988a8524283 100644 --- a/clients/client-mediaconvert/src/MediaConvertClient.ts +++ b/clients/client-mediaconvert/src/MediaConvertClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -170,11 +170,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mediaconvert/src/runtimeConfig.browser.ts b/clients/client-mediaconvert/src/runtimeConfig.browser.ts index bae3d22fea80..bd6d4a345da5 100644 --- a/clients/client-mediaconvert/src/runtimeConfig.browser.ts +++ b/clients/client-mediaconvert/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MediaConvertClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mediaconvert/src/runtimeConfig.ts b/clients/client-mediaconvert/src/runtimeConfig.ts index 6995bfb6059c..44a04862807d 100644 --- a/clients/client-mediaconvert/src/runtimeConfig.ts +++ b/clients/client-mediaconvert/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MediaConvertClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-medialive/package.json b/clients/client-medialive/package.json index 5c6e9f3cb42f..0da88649f736 100644 --- a/clients/client-medialive/package.json +++ b/clients/client-medialive/package.json @@ -32,33 +32,33 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-medialive/src/MediaLiveClient.ts b/clients/client-medialive/src/MediaLiveClient.ts index f1c313c9abd6..c75bdf219700 100644 --- a/clients/client-medialive/src/MediaLiveClient.ts +++ b/clients/client-medialive/src/MediaLiveClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -345,11 +345,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-medialive/src/runtimeConfig.browser.ts b/clients/client-medialive/src/runtimeConfig.browser.ts index 126f442bc166..6175a2474cf9 100644 --- a/clients/client-medialive/src/runtimeConfig.browser.ts +++ b/clients/client-medialive/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MediaLiveClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-medialive/src/runtimeConfig.ts b/clients/client-medialive/src/runtimeConfig.ts index 23165fd5346a..d903d3cd57cb 100644 --- a/clients/client-medialive/src/runtimeConfig.ts +++ b/clients/client-medialive/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MediaLiveClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mediapackage-vod/package.json b/clients/client-mediapackage-vod/package.json index 91c26f82f26c..1ca7ec22db3c 100644 --- a/clients/client-mediapackage-vod/package.json +++ b/clients/client-mediapackage-vod/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-mediapackage-vod/src/MediaPackageVodClient.ts b/clients/client-mediapackage-vod/src/MediaPackageVodClient.ts index 19e364d55321..2d8366264cd6 100644 --- a/clients/client-mediapackage-vod/src/MediaPackageVodClient.ts +++ b/clients/client-mediapackage-vod/src/MediaPackageVodClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -158,11 +158,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mediapackage-vod/src/runtimeConfig.browser.ts b/clients/client-mediapackage-vod/src/runtimeConfig.browser.ts index c1077a2c644f..e77136ffe030 100644 --- a/clients/client-mediapackage-vod/src/runtimeConfig.browser.ts +++ b/clients/client-mediapackage-vod/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MediaPackageVodClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mediapackage-vod/src/runtimeConfig.ts b/clients/client-mediapackage-vod/src/runtimeConfig.ts index 8e25f4e3b7db..69c35ddd3dee 100644 --- a/clients/client-mediapackage-vod/src/runtimeConfig.ts +++ b/clients/client-mediapackage-vod/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MediaPackageVodClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mediapackage/package.json b/clients/client-mediapackage/package.json index 9f0062ae9357..9071e8622db0 100644 --- a/clients/client-mediapackage/package.json +++ b/clients/client-mediapackage/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-mediapackage/src/MediaPackageClient.ts b/clients/client-mediapackage/src/MediaPackageClient.ts index ce66cea43c95..3bb96ce0c05a 100644 --- a/clients/client-mediapackage/src/MediaPackageClient.ts +++ b/clients/client-mediapackage/src/MediaPackageClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -158,11 +158,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mediapackage/src/runtimeConfig.browser.ts b/clients/client-mediapackage/src/runtimeConfig.browser.ts index 0a042505a491..32744f67fe60 100644 --- a/clients/client-mediapackage/src/runtimeConfig.browser.ts +++ b/clients/client-mediapackage/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MediaPackageClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mediapackage/src/runtimeConfig.ts b/clients/client-mediapackage/src/runtimeConfig.ts index 39ea2272cb1b..aee9df013313 100644 --- a/clients/client-mediapackage/src/runtimeConfig.ts +++ b/clients/client-mediapackage/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MediaPackageClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mediapackagev2/package.json b/clients/client-mediapackagev2/package.json index 25982c1bec71..3ca0035c5d9e 100644 --- a/clients/client-mediapackagev2/package.json +++ b/clients/client-mediapackagev2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-mediapackagev2/src/MediaPackageV2Client.ts b/clients/client-mediapackagev2/src/MediaPackageV2Client.ts index e9b9940648d8..0de8d70e50ee 100644 --- a/clients/client-mediapackagev2/src/MediaPackageV2Client.ts +++ b/clients/client-mediapackagev2/src/MediaPackageV2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -176,11 +176,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mediapackagev2/src/runtimeConfig.browser.ts b/clients/client-mediapackagev2/src/runtimeConfig.browser.ts index d71b8d84396f..6dcc247e36ae 100644 --- a/clients/client-mediapackagev2/src/runtimeConfig.browser.ts +++ b/clients/client-mediapackagev2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MediaPackageV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mediapackagev2/src/runtimeConfig.ts b/clients/client-mediapackagev2/src/runtimeConfig.ts index 72f4031da9f1..698920e98521 100644 --- a/clients/client-mediapackagev2/src/runtimeConfig.ts +++ b/clients/client-mediapackagev2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MediaPackageV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mediastore-data/package.json b/clients/client-mediastore-data/package.json index 2dc939b146da..fff37dfd3228 100644 --- a/clients/client-mediastore-data/package.json +++ b/clients/client-mediastore-data/package.json @@ -34,31 +34,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-mediastore-data/src/MediaStoreDataClient.ts b/clients/client-mediastore-data/src/MediaStoreDataClient.ts index 005f6abda4a3..2d710c1a1116 100644 --- a/clients/client-mediastore-data/src/MediaStoreDataClient.ts +++ b/clients/client-mediastore-data/src/MediaStoreDataClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -93,11 +93,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mediastore-data/src/runtimeConfig.browser.ts b/clients/client-mediastore-data/src/runtimeConfig.browser.ts index 24178ccb4ae2..2842862355b8 100644 --- a/clients/client-mediastore-data/src/runtimeConfig.browser.ts +++ b/clients/client-mediastore-data/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MediaStoreDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mediastore-data/src/runtimeConfig.ts b/clients/client-mediastore-data/src/runtimeConfig.ts index 633619139466..68d6aa798570 100644 --- a/clients/client-mediastore-data/src/runtimeConfig.ts +++ b/clients/client-mediastore-data/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MediaStoreDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mediastore/package.json b/clients/client-mediastore/package.json index c16e5d00ff7a..3920e050f08d 100644 --- a/clients/client-mediastore/package.json +++ b/clients/client-mediastore/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-mediastore/src/MediaStoreClient.ts b/clients/client-mediastore/src/MediaStoreClient.ts index 4722a7db5d8e..2c39dad4ee1e 100644 --- a/clients/client-mediastore/src/MediaStoreClient.ts +++ b/clients/client-mediastore/src/MediaStoreClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -149,11 +149,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mediastore/src/runtimeConfig.browser.ts b/clients/client-mediastore/src/runtimeConfig.browser.ts index 9415bf113cbf..be5ae9b55e84 100644 --- a/clients/client-mediastore/src/runtimeConfig.browser.ts +++ b/clients/client-mediastore/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MediaStoreClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mediastore/src/runtimeConfig.ts b/clients/client-mediastore/src/runtimeConfig.ts index 098ad77fe2f0..986df8e44391 100644 --- a/clients/client-mediastore/src/runtimeConfig.ts +++ b/clients/client-mediastore/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MediaStoreClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mediatailor/package.json b/clients/client-mediatailor/package.json index 3b8c9bde9f56..c62c4254eea4 100644 --- a/clients/client-mediatailor/package.json +++ b/clients/client-mediatailor/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-mediatailor/src/MediaTailorClient.ts b/clients/client-mediatailor/src/MediaTailorClient.ts index 56dc96d729c3..fb7ee6204ace 100644 --- a/clients/client-mediatailor/src/MediaTailorClient.ts +++ b/clients/client-mediatailor/src/MediaTailorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -260,11 +260,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mediatailor/src/runtimeConfig.browser.ts b/clients/client-mediatailor/src/runtimeConfig.browser.ts index 8e1fa2976840..5bde82e9ac96 100644 --- a/clients/client-mediatailor/src/runtimeConfig.browser.ts +++ b/clients/client-mediatailor/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MediaTailorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mediatailor/src/runtimeConfig.ts b/clients/client-mediatailor/src/runtimeConfig.ts index 899f23885305..5508f46d271e 100644 --- a/clients/client-mediatailor/src/runtimeConfig.ts +++ b/clients/client-mediatailor/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MediaTailorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-medical-imaging/package.json b/clients/client-medical-imaging/package.json index e05b1995b0bc..f50a7bebfdc7 100644 --- a/clients/client-medical-imaging/package.json +++ b/clients/client-medical-imaging/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-medical-imaging/src/MedicalImagingClient.ts b/clients/client-medical-imaging/src/MedicalImagingClient.ts index 10f4c3289c4a..2794cb7b2e7d 100644 --- a/clients/client-medical-imaging/src/MedicalImagingClient.ts +++ b/clients/client-medical-imaging/src/MedicalImagingClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -150,11 +150,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-medical-imaging/src/runtimeConfig.browser.ts b/clients/client-medical-imaging/src/runtimeConfig.browser.ts index c80345a8e00a..add5f9dd5590 100644 --- a/clients/client-medical-imaging/src/runtimeConfig.browser.ts +++ b/clients/client-medical-imaging/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MedicalImagingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-medical-imaging/src/runtimeConfig.ts b/clients/client-medical-imaging/src/runtimeConfig.ts index acc2ce4471a1..01d4c217e622 100644 --- a/clients/client-medical-imaging/src/runtimeConfig.ts +++ b/clients/client-medical-imaging/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MedicalImagingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-memorydb/package.json b/clients/client-memorydb/package.json index 44cf8b926f30..260f09bfc917 100644 --- a/clients/client-memorydb/package.json +++ b/clients/client-memorydb/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-memorydb/src/MemoryDBClient.ts b/clients/client-memorydb/src/MemoryDBClient.ts index 40b8597f8e35..ab5e825d926c 100644 --- a/clients/client-memorydb/src/MemoryDBClient.ts +++ b/clients/client-memorydb/src/MemoryDBClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -227,11 +227,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-memorydb/src/runtimeConfig.browser.ts b/clients/client-memorydb/src/runtimeConfig.browser.ts index 4be665ce15d1..974cf95794d5 100644 --- a/clients/client-memorydb/src/runtimeConfig.browser.ts +++ b/clients/client-memorydb/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MemoryDBClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-memorydb/src/runtimeConfig.ts b/clients/client-memorydb/src/runtimeConfig.ts index ce01dab70ac9..fa568ac22b09 100644 --- a/clients/client-memorydb/src/runtimeConfig.ts +++ b/clients/client-memorydb/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MemoryDBClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mgn/package.json b/clients/client-mgn/package.json index a763fd7640f6..0485961029b1 100644 --- a/clients/client-mgn/package.json +++ b/clients/client-mgn/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-mgn/src/MgnClient.ts b/clients/client-mgn/src/MgnClient.ts index 6a00493a8e8d..dcb21948866b 100644 --- a/clients/client-mgn/src/MgnClient.ts +++ b/clients/client-mgn/src/MgnClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -386,11 +386,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mgn/src/runtimeConfig.browser.ts b/clients/client-mgn/src/runtimeConfig.browser.ts index f8bca7bee508..1764d60cf29a 100644 --- a/clients/client-mgn/src/runtimeConfig.browser.ts +++ b/clients/client-mgn/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MgnClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mgn/src/runtimeConfig.ts b/clients/client-mgn/src/runtimeConfig.ts index 3f30b0a3b32f..ca5f2060214e 100644 --- a/clients/client-mgn/src/runtimeConfig.ts +++ b/clients/client-mgn/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MgnClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-migration-hub-refactor-spaces/package.json b/clients/client-migration-hub-refactor-spaces/package.json index 940963ad9137..2fae72ff100d 100644 --- a/clients/client-migration-hub-refactor-spaces/package.json +++ b/clients/client-migration-hub-refactor-spaces/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-migration-hub-refactor-spaces/src/MigrationHubRefactorSpacesClient.ts b/clients/client-migration-hub-refactor-spaces/src/MigrationHubRefactorSpacesClient.ts index 4c361d2c8c15..0fee824a704f 100644 --- a/clients/client-migration-hub-refactor-spaces/src/MigrationHubRefactorSpacesClient.ts +++ b/clients/client-migration-hub-refactor-spaces/src/MigrationHubRefactorSpacesClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -158,11 +158,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-migration-hub-refactor-spaces/src/runtimeConfig.browser.ts b/clients/client-migration-hub-refactor-spaces/src/runtimeConfig.browser.ts index cc0124cb7857..0302c1875e95 100644 --- a/clients/client-migration-hub-refactor-spaces/src/runtimeConfig.browser.ts +++ b/clients/client-migration-hub-refactor-spaces/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MigrationHubRefactorSpacesClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-migration-hub-refactor-spaces/src/runtimeConfig.ts b/clients/client-migration-hub-refactor-spaces/src/runtimeConfig.ts index d84912b72f2b..04902148ec29 100644 --- a/clients/client-migration-hub-refactor-spaces/src/runtimeConfig.ts +++ b/clients/client-migration-hub-refactor-spaces/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MigrationHubRefactorSpacesClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-migration-hub/package.json b/clients/client-migration-hub/package.json index 877fcb5a564b..ddd3a5ab7ff9 100644 --- a/clients/client-migration-hub/package.json +++ b/clients/client-migration-hub/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-migration-hub/src/MigrationHubClient.ts b/clients/client-migration-hub/src/MigrationHubClient.ts index 86098b963c17..2e87a31ae58c 100644 --- a/clients/client-migration-hub/src/MigrationHubClient.ts +++ b/clients/client-migration-hub/src/MigrationHubClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -176,11 +176,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-migration-hub/src/runtimeConfig.browser.ts b/clients/client-migration-hub/src/runtimeConfig.browser.ts index eb86f7f6bc68..3df9a257e96c 100644 --- a/clients/client-migration-hub/src/runtimeConfig.browser.ts +++ b/clients/client-migration-hub/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MigrationHubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-migration-hub/src/runtimeConfig.ts b/clients/client-migration-hub/src/runtimeConfig.ts index 70c6baacb3ed..4e2e5e348fe2 100644 --- a/clients/client-migration-hub/src/runtimeConfig.ts +++ b/clients/client-migration-hub/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MigrationHubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-migrationhub-config/package.json b/clients/client-migrationhub-config/package.json index 12b3a6d1be7b..a1b7515d23a9 100644 --- a/clients/client-migrationhub-config/package.json +++ b/clients/client-migrationhub-config/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts b/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts index 28ffc6586ffd..835c6dc3e04c 100644 --- a/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts +++ b/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -98,11 +98,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-migrationhub-config/src/runtimeConfig.browser.ts b/clients/client-migrationhub-config/src/runtimeConfig.browser.ts index 84b95e7f53f0..2b59d7161e73 100644 --- a/clients/client-migrationhub-config/src/runtimeConfig.browser.ts +++ b/clients/client-migrationhub-config/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MigrationHubConfigClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-migrationhub-config/src/runtimeConfig.ts b/clients/client-migrationhub-config/src/runtimeConfig.ts index 1e1250087a27..a500843c9868 100644 --- a/clients/client-migrationhub-config/src/runtimeConfig.ts +++ b/clients/client-migrationhub-config/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MigrationHubConfigClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-migrationhuborchestrator/package.json b/clients/client-migrationhuborchestrator/package.json index 7a172c289d46..834d63cc9e49 100644 --- a/clients/client-migrationhuborchestrator/package.json +++ b/clients/client-migrationhuborchestrator/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-migrationhuborchestrator/src/MigrationHubOrchestratorClient.ts b/clients/client-migrationhuborchestrator/src/MigrationHubOrchestratorClient.ts index 3636e823da30..64fc26d8b8c8 100644 --- a/clients/client-migrationhuborchestrator/src/MigrationHubOrchestratorClient.ts +++ b/clients/client-migrationhuborchestrator/src/MigrationHubOrchestratorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -185,11 +185,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-migrationhuborchestrator/src/runtimeConfig.browser.ts b/clients/client-migrationhuborchestrator/src/runtimeConfig.browser.ts index a67a87e4e28e..55e7589919fc 100644 --- a/clients/client-migrationhuborchestrator/src/runtimeConfig.browser.ts +++ b/clients/client-migrationhuborchestrator/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MigrationHubOrchestratorClientConfig) = defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-migrationhuborchestrator/src/runtimeConfig.ts b/clients/client-migrationhuborchestrator/src/runtimeConfig.ts index e4246408c983..c2bd262baea3 100644 --- a/clients/client-migrationhuborchestrator/src/runtimeConfig.ts +++ b/clients/client-migrationhuborchestrator/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MigrationHubOrchestratorClientConfig) = defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-migrationhubstrategy/package.json b/clients/client-migrationhubstrategy/package.json index 44489f916887..3c59bbc13dfe 100644 --- a/clients/client-migrationhubstrategy/package.json +++ b/clients/client-migrationhubstrategy/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-migrationhubstrategy/src/MigrationHubStrategyClient.ts b/clients/client-migrationhubstrategy/src/MigrationHubStrategyClient.ts index aebe938d486f..751fa24c09a7 100644 --- a/clients/client-migrationhubstrategy/src/MigrationHubStrategyClient.ts +++ b/clients/client-migrationhubstrategy/src/MigrationHubStrategyClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -182,11 +182,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-migrationhubstrategy/src/runtimeConfig.browser.ts b/clients/client-migrationhubstrategy/src/runtimeConfig.browser.ts index a63da4d6ac65..11720f94bb2d 100644 --- a/clients/client-migrationhubstrategy/src/runtimeConfig.browser.ts +++ b/clients/client-migrationhubstrategy/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MigrationHubStrategyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-migrationhubstrategy/src/runtimeConfig.ts b/clients/client-migrationhubstrategy/src/runtimeConfig.ts index 0c6a4257c291..b59ced05a86f 100644 --- a/clients/client-migrationhubstrategy/src/runtimeConfig.ts +++ b/clients/client-migrationhubstrategy/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MigrationHubStrategyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mobile/package.json b/clients/client-mobile/package.json index 7088198a8a28..626ffa57b380 100644 --- a/clients/client-mobile/package.json +++ b/clients/client-mobile/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-mobile/src/MobileClient.ts b/clients/client-mobile/src/MobileClient.ts index 1d4e71fe31c3..4daca1fc8cc9 100644 --- a/clients/client-mobile/src/MobileClient.ts +++ b/clients/client-mobile/src/MobileClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -104,11 +104,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mobile/src/runtimeConfig.browser.ts b/clients/client-mobile/src/runtimeConfig.browser.ts index d0b63c75a96e..bec1798d9bb8 100644 --- a/clients/client-mobile/src/runtimeConfig.browser.ts +++ b/clients/client-mobile/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MobileClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mobile/src/runtimeConfig.ts b/clients/client-mobile/src/runtimeConfig.ts index 8d0a9fc2fcae..01d4218550aa 100644 --- a/clients/client-mobile/src/runtimeConfig.ts +++ b/clients/client-mobile/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MobileClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mq/package.json b/clients/client-mq/package.json index 517676c2213f..6ef43205322a 100644 --- a/clients/client-mq/package.json +++ b/clients/client-mq/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-mq/src/MqClient.ts b/clients/client-mq/src/MqClient.ts index 267fa0ac6f4f..bf76c448719d 100644 --- a/clients/client-mq/src/MqClient.ts +++ b/clients/client-mq/src/MqClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -167,11 +167,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mq/src/runtimeConfig.browser.ts b/clients/client-mq/src/runtimeConfig.browser.ts index 93397513f688..3e38d775dec9 100644 --- a/clients/client-mq/src/runtimeConfig.browser.ts +++ b/clients/client-mq/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MqClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mq/src/runtimeConfig.ts b/clients/client-mq/src/runtimeConfig.ts index 6330e86d6b53..2595bcfeb162 100644 --- a/clients/client-mq/src/runtimeConfig.ts +++ b/clients/client-mq/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MqClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mturk/package.json b/clients/client-mturk/package.json index 7ba7a1ae1258..16430943a40b 100644 --- a/clients/client-mturk/package.json +++ b/clients/client-mturk/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-mturk/src/MTurkClient.ts b/clients/client-mturk/src/MTurkClient.ts index 67ffdee46c5f..72d9cbe4d6df 100644 --- a/clients/client-mturk/src/MTurkClient.ts +++ b/clients/client-mturk/src/MTurkClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -257,11 +257,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mturk/src/runtimeConfig.browser.ts b/clients/client-mturk/src/runtimeConfig.browser.ts index b2377e85a41d..08e16593e0cb 100644 --- a/clients/client-mturk/src/runtimeConfig.browser.ts +++ b/clients/client-mturk/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MTurkClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mturk/src/runtimeConfig.ts b/clients/client-mturk/src/runtimeConfig.ts index 5197593975e1..342406e870e3 100644 --- a/clients/client-mturk/src/runtimeConfig.ts +++ b/clients/client-mturk/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MTurkClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-mwaa/package.json b/clients/client-mwaa/package.json index 620472d5762e..7dab7cda1991 100644 --- a/clients/client-mwaa/package.json +++ b/clients/client-mwaa/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-mwaa/src/MWAAClient.ts b/clients/client-mwaa/src/MWAAClient.ts index 0ce36151b295..e63cef3cdda4 100644 --- a/clients/client-mwaa/src/MWAAClient.ts +++ b/clients/client-mwaa/src/MWAAClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -116,11 +116,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-mwaa/src/runtimeConfig.browser.ts b/clients/client-mwaa/src/runtimeConfig.browser.ts index f3906ce42e1e..5c284d26afd0 100644 --- a/clients/client-mwaa/src/runtimeConfig.browser.ts +++ b/clients/client-mwaa/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: MWAAClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-mwaa/src/runtimeConfig.ts b/clients/client-mwaa/src/runtimeConfig.ts index 24c4819f8476..de8ec065152f 100644 --- a/clients/client-mwaa/src/runtimeConfig.ts +++ b/clients/client-mwaa/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: MWAAClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-neptune-graph/package.json b/clients/client-neptune-graph/package.json index fc772c4d1e36..8de6867535cf 100644 --- a/clients/client-neptune-graph/package.json +++ b/clients/client-neptune-graph/package.json @@ -32,33 +32,33 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-neptune-graph/src/NeptuneGraphClient.ts b/clients/client-neptune-graph/src/NeptuneGraphClient.ts index 43112355805c..5b969655458a 100644 --- a/clients/client-neptune-graph/src/NeptuneGraphClient.ts +++ b/clients/client-neptune-graph/src/NeptuneGraphClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -186,11 +186,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-neptune-graph/src/runtimeConfig.browser.ts b/clients/client-neptune-graph/src/runtimeConfig.browser.ts index a9ee6ba1e278..375936f591de 100644 --- a/clients/client-neptune-graph/src/runtimeConfig.browser.ts +++ b/clients/client-neptune-graph/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: NeptuneGraphClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-neptune-graph/src/runtimeConfig.ts b/clients/client-neptune-graph/src/runtimeConfig.ts index b804ddc387b6..4f102dcba445 100644 --- a/clients/client-neptune-graph/src/runtimeConfig.ts +++ b/clients/client-neptune-graph/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: NeptuneGraphClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-neptune/package.json b/clients/client-neptune/package.json index 08fb5a831893..da522b874edf 100644 --- a/clients/client-neptune/package.json +++ b/clients/client-neptune/package.json @@ -33,32 +33,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-neptune/src/NeptuneClient.ts b/clients/client-neptune/src/NeptuneClient.ts index e60a28a458b4..3bb13b54c49f 100644 --- a/clients/client-neptune/src/NeptuneClient.ts +++ b/clients/client-neptune/src/NeptuneClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -449,11 +449,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-neptune/src/runtimeConfig.browser.ts b/clients/client-neptune/src/runtimeConfig.browser.ts index eaeffced4349..83aa992132e7 100644 --- a/clients/client-neptune/src/runtimeConfig.browser.ts +++ b/clients/client-neptune/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: NeptuneClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-neptune/src/runtimeConfig.ts b/clients/client-neptune/src/runtimeConfig.ts index 97d40cb751ab..5c1b8fe40e5a 100644 --- a/clients/client-neptune/src/runtimeConfig.ts +++ b/clients/client-neptune/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: NeptuneClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-neptunedata/package.json b/clients/client-neptunedata/package.json index 72902bc2a52b..32cce77e6768 100644 --- a/clients/client-neptunedata/package.json +++ b/clients/client-neptunedata/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-neptunedata/src/NeptunedataClient.ts b/clients/client-neptunedata/src/NeptunedataClient.ts index 86383433a75e..233a6eec5674 100644 --- a/clients/client-neptunedata/src/NeptunedataClient.ts +++ b/clients/client-neptunedata/src/NeptunedataClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -293,11 +293,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-neptunedata/src/runtimeConfig.browser.ts b/clients/client-neptunedata/src/runtimeConfig.browser.ts index c67b6aa869f9..f8e44636cf6a 100644 --- a/clients/client-neptunedata/src/runtimeConfig.browser.ts +++ b/clients/client-neptunedata/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: NeptunedataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-neptunedata/src/runtimeConfig.ts b/clients/client-neptunedata/src/runtimeConfig.ts index a83abc828895..0a0343858156 100644 --- a/clients/client-neptunedata/src/runtimeConfig.ts +++ b/clients/client-neptunedata/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: NeptunedataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-network-firewall/package.json b/clients/client-network-firewall/package.json index fe4e14fd54bd..1240ddb3a6e8 100644 --- a/clients/client-network-firewall/package.json +++ b/clients/client-network-firewall/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-network-firewall/src/NetworkFirewallClient.ts b/clients/client-network-firewall/src/NetworkFirewallClient.ts index 33ccba6efa3b..70c89e6dba91 100644 --- a/clients/client-network-firewall/src/NetworkFirewallClient.ts +++ b/clients/client-network-firewall/src/NetworkFirewallClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -254,11 +254,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-network-firewall/src/runtimeConfig.browser.ts b/clients/client-network-firewall/src/runtimeConfig.browser.ts index 4389f6c3d91f..9b954d8c9cc2 100644 --- a/clients/client-network-firewall/src/runtimeConfig.browser.ts +++ b/clients/client-network-firewall/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: NetworkFirewallClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-network-firewall/src/runtimeConfig.ts b/clients/client-network-firewall/src/runtimeConfig.ts index 13eff082eea4..e3428ae6a71d 100644 --- a/clients/client-network-firewall/src/runtimeConfig.ts +++ b/clients/client-network-firewall/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: NetworkFirewallClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-networkmanager/package.json b/clients/client-networkmanager/package.json index 9c24c5c9c39c..124297fb31b7 100644 --- a/clients/client-networkmanager/package.json +++ b/clients/client-networkmanager/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-networkmanager/src/NetworkManagerClient.ts b/clients/client-networkmanager/src/NetworkManagerClient.ts index acc548ab0d97..ef24834774b0 100644 --- a/clients/client-networkmanager/src/NetworkManagerClient.ts +++ b/clients/client-networkmanager/src/NetworkManagerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -464,11 +464,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-networkmanager/src/runtimeConfig.browser.ts b/clients/client-networkmanager/src/runtimeConfig.browser.ts index d6ec42bff301..6bdcac5f1ab5 100644 --- a/clients/client-networkmanager/src/runtimeConfig.browser.ts +++ b/clients/client-networkmanager/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: NetworkManagerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-networkmanager/src/runtimeConfig.ts b/clients/client-networkmanager/src/runtimeConfig.ts index 808c284d3d6d..d6beb8ebbeb9 100644 --- a/clients/client-networkmanager/src/runtimeConfig.ts +++ b/clients/client-networkmanager/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: NetworkManagerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-networkmonitor/package.json b/clients/client-networkmonitor/package.json index 26443acfefa1..f77a859fc2ab 100644 --- a/clients/client-networkmonitor/package.json +++ b/clients/client-networkmonitor/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-networkmonitor/src/NetworkMonitorClient.ts b/clients/client-networkmonitor/src/NetworkMonitorClient.ts index a323f9ee6cdb..d050efcf80b1 100644 --- a/clients/client-networkmonitor/src/NetworkMonitorClient.ts +++ b/clients/client-networkmonitor/src/NetworkMonitorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -116,11 +116,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-networkmonitor/src/runtimeConfig.browser.ts b/clients/client-networkmonitor/src/runtimeConfig.browser.ts index 08174cac5c37..af0fcd4ac4ad 100644 --- a/clients/client-networkmonitor/src/runtimeConfig.browser.ts +++ b/clients/client-networkmonitor/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: NetworkMonitorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-networkmonitor/src/runtimeConfig.ts b/clients/client-networkmonitor/src/runtimeConfig.ts index d4f04fdc1bf5..0751d69468c2 100644 --- a/clients/client-networkmonitor/src/runtimeConfig.ts +++ b/clients/client-networkmonitor/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: NetworkMonitorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-nimble/package.json b/clients/client-nimble/package.json index ff612e364805..7acd077841ce 100644 --- a/clients/client-nimble/package.json +++ b/clients/client-nimble/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-nimble/src/NimbleClient.ts b/clients/client-nimble/src/NimbleClient.ts index a07d98f5dbef..0b1a94b7fefb 100644 --- a/clients/client-nimble/src/NimbleClient.ts +++ b/clients/client-nimble/src/NimbleClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -317,11 +317,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-nimble/src/runtimeConfig.browser.ts b/clients/client-nimble/src/runtimeConfig.browser.ts index 6a80ea8a3d3b..6cef5214ac65 100644 --- a/clients/client-nimble/src/runtimeConfig.browser.ts +++ b/clients/client-nimble/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: NimbleClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-nimble/src/runtimeConfig.ts b/clients/client-nimble/src/runtimeConfig.ts index 41a394571c72..124333698c99 100644 --- a/clients/client-nimble/src/runtimeConfig.ts +++ b/clients/client-nimble/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: NimbleClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-oam/package.json b/clients/client-oam/package.json index 4a1f8b458ea0..0d21849cbb17 100644 --- a/clients/client-oam/package.json +++ b/clients/client-oam/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-oam/src/OAMClient.ts b/clients/client-oam/src/OAMClient.ts index b38759d377cd..636cbcb25a7b 100644 --- a/clients/client-oam/src/OAMClient.ts +++ b/clients/client-oam/src/OAMClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -125,11 +125,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-oam/src/runtimeConfig.browser.ts b/clients/client-oam/src/runtimeConfig.browser.ts index 0271ca05fa18..a31ea5dd58b8 100644 --- a/clients/client-oam/src/runtimeConfig.browser.ts +++ b/clients/client-oam/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: OAMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-oam/src/runtimeConfig.ts b/clients/client-oam/src/runtimeConfig.ts index 137af2e95bb0..fcb447c60caf 100644 --- a/clients/client-oam/src/runtimeConfig.ts +++ b/clients/client-oam/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: OAMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-omics/package.json b/clients/client-omics/package.json index 63ace1db3468..3e2affcf8571 100644 --- a/clients/client-omics/package.json +++ b/clients/client-omics/package.json @@ -32,33 +32,33 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-omics/src/OmicsClient.ts b/clients/client-omics/src/OmicsClient.ts index 5e30c6733ff0..cd5c069205e5 100644 --- a/clients/client-omics/src/OmicsClient.ts +++ b/clients/client-omics/src/OmicsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -447,11 +447,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-omics/src/runtimeConfig.browser.ts b/clients/client-omics/src/runtimeConfig.browser.ts index caf022da3db0..2a993b7d9f48 100644 --- a/clients/client-omics/src/runtimeConfig.browser.ts +++ b/clients/client-omics/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: OmicsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-omics/src/runtimeConfig.ts b/clients/client-omics/src/runtimeConfig.ts index bdd287fb4cf8..3cad89f0036f 100644 --- a/clients/client-omics/src/runtimeConfig.ts +++ b/clients/client-omics/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: OmicsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-opensearch/package.json b/clients/client-opensearch/package.json index 1bb93d7504e3..336da1c80c58 100644 --- a/clients/client-opensearch/package.json +++ b/clients/client-opensearch/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-opensearch/src/OpenSearchClient.ts b/clients/client-opensearch/src/OpenSearchClient.ts index 36c896017ad5..2fe6eb79d6a3 100644 --- a/clients/client-opensearch/src/OpenSearchClient.ts +++ b/clients/client-opensearch/src/OpenSearchClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -371,11 +371,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-opensearch/src/runtimeConfig.browser.ts b/clients/client-opensearch/src/runtimeConfig.browser.ts index c7c007b5be47..0bb9746502ad 100644 --- a/clients/client-opensearch/src/runtimeConfig.browser.ts +++ b/clients/client-opensearch/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: OpenSearchClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-opensearch/src/runtimeConfig.ts b/clients/client-opensearch/src/runtimeConfig.ts index 16a3bc618b66..13490efa2efc 100644 --- a/clients/client-opensearch/src/runtimeConfig.ts +++ b/clients/client-opensearch/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: OpenSearchClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-opensearchserverless/package.json b/clients/client-opensearchserverless/package.json index 65b0a3504106..e8c0a30d48c0 100644 --- a/clients/client-opensearchserverless/package.json +++ b/clients/client-opensearchserverless/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-opensearchserverless/src/OpenSearchServerlessClient.ts b/clients/client-opensearchserverless/src/OpenSearchServerlessClient.ts index f957738dd9fd..4f2af3366f47 100644 --- a/clients/client-opensearchserverless/src/OpenSearchServerlessClient.ts +++ b/clients/client-opensearchserverless/src/OpenSearchServerlessClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -239,11 +239,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-opensearchserverless/src/runtimeConfig.browser.ts b/clients/client-opensearchserverless/src/runtimeConfig.browser.ts index 3ea0a4f210a1..a6b0f374b131 100644 --- a/clients/client-opensearchserverless/src/runtimeConfig.browser.ts +++ b/clients/client-opensearchserverless/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: OpenSearchServerlessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-opensearchserverless/src/runtimeConfig.ts b/clients/client-opensearchserverless/src/runtimeConfig.ts index 0ce8a90f665f..2421e5beb832 100644 --- a/clients/client-opensearchserverless/src/runtimeConfig.ts +++ b/clients/client-opensearchserverless/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: OpenSearchServerlessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-opsworks/package.json b/clients/client-opsworks/package.json index 4e5faff458c6..f83cf0fe3f55 100644 --- a/clients/client-opsworks/package.json +++ b/clients/client-opsworks/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-opsworks/src/OpsWorksClient.ts b/clients/client-opsworks/src/OpsWorksClient.ts index 79cba58b1c11..82eee5acb5ca 100644 --- a/clients/client-opsworks/src/OpsWorksClient.ts +++ b/clients/client-opsworks/src/OpsWorksClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -377,11 +377,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-opsworks/src/runtimeConfig.browser.ts b/clients/client-opsworks/src/runtimeConfig.browser.ts index 4b5cbb8c31ed..7e78a3b168b5 100644 --- a/clients/client-opsworks/src/runtimeConfig.browser.ts +++ b/clients/client-opsworks/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: OpsWorksClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-opsworks/src/runtimeConfig.ts b/clients/client-opsworks/src/runtimeConfig.ts index 49e364621e9c..91889c4c99d5 100644 --- a/clients/client-opsworks/src/runtimeConfig.ts +++ b/clients/client-opsworks/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: OpsWorksClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-opsworkscm/package.json b/clients/client-opsworkscm/package.json index 31971c579af0..287d3139bceb 100644 --- a/clients/client-opsworkscm/package.json +++ b/clients/client-opsworkscm/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-opsworkscm/src/OpsWorksCMClient.ts b/clients/client-opsworkscm/src/OpsWorksCMClient.ts index 57ac464915a6..8e56501dc197 100644 --- a/clients/client-opsworkscm/src/OpsWorksCMClient.ts +++ b/clients/client-opsworkscm/src/OpsWorksCMClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -149,11 +149,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-opsworkscm/src/runtimeConfig.browser.ts b/clients/client-opsworkscm/src/runtimeConfig.browser.ts index 37765d2f4643..1723441f5602 100644 --- a/clients/client-opsworkscm/src/runtimeConfig.browser.ts +++ b/clients/client-opsworkscm/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: OpsWorksCMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-opsworkscm/src/runtimeConfig.ts b/clients/client-opsworkscm/src/runtimeConfig.ts index aea6dc7d0eb6..399c094a675a 100644 --- a/clients/client-opsworkscm/src/runtimeConfig.ts +++ b/clients/client-opsworkscm/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: OpsWorksCMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-organizations/package.json b/clients/client-organizations/package.json index 4c655ea13ecf..fafe8f87cca7 100644 --- a/clients/client-organizations/package.json +++ b/clients/client-organizations/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-organizations/src/OrganizationsClient.ts b/clients/client-organizations/src/OrganizationsClient.ts index 77d78d0a88ee..a4c105fa4e54 100644 --- a/clients/client-organizations/src/OrganizationsClient.ts +++ b/clients/client-organizations/src/OrganizationsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -323,11 +323,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-organizations/src/runtimeConfig.browser.ts b/clients/client-organizations/src/runtimeConfig.browser.ts index 979168229a85..a56a0ff75a48 100644 --- a/clients/client-organizations/src/runtimeConfig.browser.ts +++ b/clients/client-organizations/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: OrganizationsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-organizations/src/runtimeConfig.ts b/clients/client-organizations/src/runtimeConfig.ts index 3e3a50dedaf0..a40af00e5422 100644 --- a/clients/client-organizations/src/runtimeConfig.ts +++ b/clients/client-organizations/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: OrganizationsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-osis/package.json b/clients/client-osis/package.json index c17f26ff065e..cd97ca593b8f 100644 --- a/clients/client-osis/package.json +++ b/clients/client-osis/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-osis/src/OSISClient.ts b/clients/client-osis/src/OSISClient.ts index 3cf4f73ecfdc..5baf7b6f4b39 100644 --- a/clients/client-osis/src/OSISClient.ts +++ b/clients/client-osis/src/OSISClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -131,11 +131,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-osis/src/runtimeConfig.browser.ts b/clients/client-osis/src/runtimeConfig.browser.ts index 726708f91d7c..e6c783a48df0 100644 --- a/clients/client-osis/src/runtimeConfig.browser.ts +++ b/clients/client-osis/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: OSISClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-osis/src/runtimeConfig.ts b/clients/client-osis/src/runtimeConfig.ts index 2082a671e252..dfb8fafd10f9 100644 --- a/clients/client-osis/src/runtimeConfig.ts +++ b/clients/client-osis/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: OSISClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-outposts/package.json b/clients/client-outposts/package.json index d06549b43342..4d1cd4e9fe3e 100644 --- a/clients/client-outposts/package.json +++ b/clients/client-outposts/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-outposts/src/OutpostsClient.ts b/clients/client-outposts/src/OutpostsClient.ts index 1ba706c41a18..5f2a4449b1cd 100644 --- a/clients/client-outposts/src/OutpostsClient.ts +++ b/clients/client-outposts/src/OutpostsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -164,11 +164,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-outposts/src/runtimeConfig.browser.ts b/clients/client-outposts/src/runtimeConfig.browser.ts index 2709ef704769..463799733e33 100644 --- a/clients/client-outposts/src/runtimeConfig.browser.ts +++ b/clients/client-outposts/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: OutpostsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-outposts/src/runtimeConfig.ts b/clients/client-outposts/src/runtimeConfig.ts index 737b546da634..01b4cf4a0d2b 100644 --- a/clients/client-outposts/src/runtimeConfig.ts +++ b/clients/client-outposts/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: OutpostsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-panorama/package.json b/clients/client-panorama/package.json index 41e82ffeec2b..f67ef646d269 100644 --- a/clients/client-panorama/package.json +++ b/clients/client-panorama/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-panorama/src/PanoramaClient.ts b/clients/client-panorama/src/PanoramaClient.ts index 3bdfc6515a9c..2f7aab7361bc 100644 --- a/clients/client-panorama/src/PanoramaClient.ts +++ b/clients/client-panorama/src/PanoramaClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -239,11 +239,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-panorama/src/runtimeConfig.browser.ts b/clients/client-panorama/src/runtimeConfig.browser.ts index e19e0def319c..6db561488b75 100644 --- a/clients/client-panorama/src/runtimeConfig.browser.ts +++ b/clients/client-panorama/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PanoramaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-panorama/src/runtimeConfig.ts b/clients/client-panorama/src/runtimeConfig.ts index 49e4ff0cd965..defcc664c9f2 100644 --- a/clients/client-panorama/src/runtimeConfig.ts +++ b/clients/client-panorama/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PanoramaClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-payment-cryptography-data/package.json b/clients/client-payment-cryptography-data/package.json index 2e8d3c1d527b..bb78196486d9 100644 --- a/clients/client-payment-cryptography-data/package.json +++ b/clients/client-payment-cryptography-data/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-payment-cryptography-data/src/PaymentCryptographyDataClient.ts b/clients/client-payment-cryptography-data/src/PaymentCryptographyDataClient.ts index 7bc1d081d1d4..7462d0569a01 100644 --- a/clients/client-payment-cryptography-data/src/PaymentCryptographyDataClient.ts +++ b/clients/client-payment-cryptography-data/src/PaymentCryptographyDataClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -119,11 +119,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-payment-cryptography-data/src/runtimeConfig.browser.ts b/clients/client-payment-cryptography-data/src/runtimeConfig.browser.ts index 12ded9c74b98..7ee1e5b4a5b7 100644 --- a/clients/client-payment-cryptography-data/src/runtimeConfig.browser.ts +++ b/clients/client-payment-cryptography-data/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PaymentCryptographyDataClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-payment-cryptography-data/src/runtimeConfig.ts b/clients/client-payment-cryptography-data/src/runtimeConfig.ts index dd70f0547316..4edc8797af1f 100644 --- a/clients/client-payment-cryptography-data/src/runtimeConfig.ts +++ b/clients/client-payment-cryptography-data/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PaymentCryptographyDataClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-payment-cryptography/package.json b/clients/client-payment-cryptography/package.json index a787e010b320..9c37fefe2711 100644 --- a/clients/client-payment-cryptography/package.json +++ b/clients/client-payment-cryptography/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-payment-cryptography/src/PaymentCryptographyClient.ts b/clients/client-payment-cryptography/src/PaymentCryptographyClient.ts index d3e92dcc88d2..98569f6357d0 100644 --- a/clients/client-payment-cryptography/src/PaymentCryptographyClient.ts +++ b/clients/client-payment-cryptography/src/PaymentCryptographyClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -149,11 +149,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-payment-cryptography/src/runtimeConfig.browser.ts b/clients/client-payment-cryptography/src/runtimeConfig.browser.ts index 106072f697ea..3d716fbbe20a 100644 --- a/clients/client-payment-cryptography/src/runtimeConfig.browser.ts +++ b/clients/client-payment-cryptography/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PaymentCryptographyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-payment-cryptography/src/runtimeConfig.ts b/clients/client-payment-cryptography/src/runtimeConfig.ts index 8f9970c2aec0..b456ef50d8c6 100644 --- a/clients/client-payment-cryptography/src/runtimeConfig.ts +++ b/clients/client-payment-cryptography/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PaymentCryptographyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-pca-connector-ad/package.json b/clients/client-pca-connector-ad/package.json index 7cf5a458386f..6b400f0c47a9 100644 --- a/clients/client-pca-connector-ad/package.json +++ b/clients/client-pca-connector-ad/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-pca-connector-ad/src/PcaConnectorAdClient.ts b/clients/client-pca-connector-ad/src/PcaConnectorAdClient.ts index 717d5cc7b8fd..544e8ddd326c 100644 --- a/clients/client-pca-connector-ad/src/PcaConnectorAdClient.ts +++ b/clients/client-pca-connector-ad/src/PcaConnectorAdClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -194,11 +194,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-pca-connector-ad/src/runtimeConfig.browser.ts b/clients/client-pca-connector-ad/src/runtimeConfig.browser.ts index 654bd1a80f0b..b49066a6eaad 100644 --- a/clients/client-pca-connector-ad/src/runtimeConfig.browser.ts +++ b/clients/client-pca-connector-ad/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PcaConnectorAdClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-pca-connector-ad/src/runtimeConfig.ts b/clients/client-pca-connector-ad/src/runtimeConfig.ts index 18033b968090..cb08e787a909 100644 --- a/clients/client-pca-connector-ad/src/runtimeConfig.ts +++ b/clients/client-pca-connector-ad/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PcaConnectorAdClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-personalize-events/package.json b/clients/client-personalize-events/package.json index f5d0745ceac6..071625b0cc44 100644 --- a/clients/client-personalize-events/package.json +++ b/clients/client-personalize-events/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-personalize-events/src/PersonalizeEventsClient.ts b/clients/client-personalize-events/src/PersonalizeEventsClient.ts index 300dd6c39886..a87e47cdc979 100644 --- a/clients/client-personalize-events/src/PersonalizeEventsClient.ts +++ b/clients/client-personalize-events/src/PersonalizeEventsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -95,11 +95,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-personalize-events/src/runtimeConfig.browser.ts b/clients/client-personalize-events/src/runtimeConfig.browser.ts index 805efc0ea202..c6bcf7101579 100644 --- a/clients/client-personalize-events/src/runtimeConfig.browser.ts +++ b/clients/client-personalize-events/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PersonalizeEventsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-personalize-events/src/runtimeConfig.ts b/clients/client-personalize-events/src/runtimeConfig.ts index 7e4fa926cfbe..7a51a1ea27e8 100644 --- a/clients/client-personalize-events/src/runtimeConfig.ts +++ b/clients/client-personalize-events/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PersonalizeEventsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-personalize-runtime/package.json b/clients/client-personalize-runtime/package.json index e9ab44980093..da83c27a671a 100644 --- a/clients/client-personalize-runtime/package.json +++ b/clients/client-personalize-runtime/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-personalize-runtime/src/PersonalizeRuntimeClient.ts b/clients/client-personalize-runtime/src/PersonalizeRuntimeClient.ts index 1468ade68ed4..187a8ef8610f 100644 --- a/clients/client-personalize-runtime/src/PersonalizeRuntimeClient.ts +++ b/clients/client-personalize-runtime/src/PersonalizeRuntimeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -92,11 +92,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-personalize-runtime/src/runtimeConfig.browser.ts b/clients/client-personalize-runtime/src/runtimeConfig.browser.ts index 6badf89e5778..c7716bcd272c 100644 --- a/clients/client-personalize-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-personalize-runtime/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PersonalizeRuntimeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-personalize-runtime/src/runtimeConfig.ts b/clients/client-personalize-runtime/src/runtimeConfig.ts index 5b6682ed603d..70427cc76b69 100644 --- a/clients/client-personalize-runtime/src/runtimeConfig.ts +++ b/clients/client-personalize-runtime/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PersonalizeRuntimeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-personalize/package.json b/clients/client-personalize/package.json index ac345fdb70be..ba25f962b5fe 100644 --- a/clients/client-personalize/package.json +++ b/clients/client-personalize/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-personalize/src/PersonalizeClient.ts b/clients/client-personalize/src/PersonalizeClient.ts index 30d3abf4fbe5..2c1ce70b9533 100644 --- a/clients/client-personalize/src/PersonalizeClient.ts +++ b/clients/client-personalize/src/PersonalizeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -359,11 +359,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-personalize/src/runtimeConfig.browser.ts b/clients/client-personalize/src/runtimeConfig.browser.ts index 7ae1294290de..9e98cda5152f 100644 --- a/clients/client-personalize/src/runtimeConfig.browser.ts +++ b/clients/client-personalize/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PersonalizeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-personalize/src/runtimeConfig.ts b/clients/client-personalize/src/runtimeConfig.ts index 3ac9e15daf62..4618d333af95 100644 --- a/clients/client-personalize/src/runtimeConfig.ts +++ b/clients/client-personalize/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PersonalizeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-pi/package.json b/clients/client-pi/package.json index 022ea2cfb710..4207a54cf4f2 100644 --- a/clients/client-pi/package.json +++ b/clients/client-pi/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-pi/src/PIClient.ts b/clients/client-pi/src/PIClient.ts index 967afacc9447..ff34eb4e63eb 100644 --- a/clients/client-pi/src/PIClient.ts +++ b/clients/client-pi/src/PIClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -146,11 +146,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-pi/src/runtimeConfig.browser.ts b/clients/client-pi/src/runtimeConfig.browser.ts index 64a4680d5dbc..ffaa81137a45 100644 --- a/clients/client-pi/src/runtimeConfig.browser.ts +++ b/clients/client-pi/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PIClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-pi/src/runtimeConfig.ts b/clients/client-pi/src/runtimeConfig.ts index 0b54b18b9088..9fc94f40fd00 100644 --- a/clients/client-pi/src/runtimeConfig.ts +++ b/clients/client-pi/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PIClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-pinpoint-email/package.json b/clients/client-pinpoint-email/package.json index 5e9c3df6fc7d..10c378824c1f 100644 --- a/clients/client-pinpoint-email/package.json +++ b/clients/client-pinpoint-email/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-pinpoint-email/src/PinpointEmailClient.ts b/clients/client-pinpoint-email/src/PinpointEmailClient.ts index f5968c268445..ed2bcf5a2239 100644 --- a/clients/client-pinpoint-email/src/PinpointEmailClient.ts +++ b/clients/client-pinpoint-email/src/PinpointEmailClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -308,11 +308,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-pinpoint-email/src/runtimeConfig.browser.ts b/clients/client-pinpoint-email/src/runtimeConfig.browser.ts index bf999d7a908d..7e8228d425dd 100644 --- a/clients/client-pinpoint-email/src/runtimeConfig.browser.ts +++ b/clients/client-pinpoint-email/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PinpointEmailClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-pinpoint-email/src/runtimeConfig.ts b/clients/client-pinpoint-email/src/runtimeConfig.ts index fba20da5fb02..d368c992fafe 100644 --- a/clients/client-pinpoint-email/src/runtimeConfig.ts +++ b/clients/client-pinpoint-email/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PinpointEmailClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-pinpoint-sms-voice-v2/package.json b/clients/client-pinpoint-sms-voice-v2/package.json index 47e517bcb705..6addc88e2989 100644 --- a/clients/client-pinpoint-sms-voice-v2/package.json +++ b/clients/client-pinpoint-sms-voice-v2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2Client.ts b/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2Client.ts index 81493952bd32..492fe871b9a7 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2Client.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -419,11 +419,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-pinpoint-sms-voice-v2/src/runtimeConfig.browser.ts b/clients/client-pinpoint-sms-voice-v2/src/runtimeConfig.browser.ts index 07acf02ceb31..6ce8b446d496 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/runtimeConfig.browser.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PinpointSMSVoiceV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-pinpoint-sms-voice-v2/src/runtimeConfig.ts b/clients/client-pinpoint-sms-voice-v2/src/runtimeConfig.ts index 9994cd2b0819..971bb5f55060 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/runtimeConfig.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PinpointSMSVoiceV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-pinpoint-sms-voice/package.json b/clients/client-pinpoint-sms-voice/package.json index 66e81d6d9726..b727e7ba19d5 100644 --- a/clients/client-pinpoint-sms-voice/package.json +++ b/clients/client-pinpoint-sms-voice/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-pinpoint-sms-voice/src/PinpointSMSVoiceClient.ts b/clients/client-pinpoint-sms-voice/src/PinpointSMSVoiceClient.ts index 07b2dcef5c8b..f527186f58aa 100644 --- a/clients/client-pinpoint-sms-voice/src/PinpointSMSVoiceClient.ts +++ b/clients/client-pinpoint-sms-voice/src/PinpointSMSVoiceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -122,11 +122,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-pinpoint-sms-voice/src/runtimeConfig.browser.ts b/clients/client-pinpoint-sms-voice/src/runtimeConfig.browser.ts index cbcae94e5c14..6f13135a6288 100644 --- a/clients/client-pinpoint-sms-voice/src/runtimeConfig.browser.ts +++ b/clients/client-pinpoint-sms-voice/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PinpointSMSVoiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-pinpoint-sms-voice/src/runtimeConfig.ts b/clients/client-pinpoint-sms-voice/src/runtimeConfig.ts index cd9b26dc2c9d..4989ad12b0a7 100644 --- a/clients/client-pinpoint-sms-voice/src/runtimeConfig.ts +++ b/clients/client-pinpoint-sms-voice/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PinpointSMSVoiceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-pinpoint/package.json b/clients/client-pinpoint/package.json index 9e0a830d92de..956969279547 100644 --- a/clients/client-pinpoint/package.json +++ b/clients/client-pinpoint/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-pinpoint/src/PinpointClient.ts b/clients/client-pinpoint/src/PinpointClient.ts index d7de0f5277bc..2abb033386c1 100644 --- a/clients/client-pinpoint/src/PinpointClient.ts +++ b/clients/client-pinpoint/src/PinpointClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -566,11 +566,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-pinpoint/src/runtimeConfig.browser.ts b/clients/client-pinpoint/src/runtimeConfig.browser.ts index a7ad5a126698..7ce6c418c5d3 100644 --- a/clients/client-pinpoint/src/runtimeConfig.browser.ts +++ b/clients/client-pinpoint/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PinpointClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-pinpoint/src/runtimeConfig.ts b/clients/client-pinpoint/src/runtimeConfig.ts index b1c2681b29cc..58b2f1fde625 100644 --- a/clients/client-pinpoint/src/runtimeConfig.ts +++ b/clients/client-pinpoint/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PinpointClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-pipes/package.json b/clients/client-pipes/package.json index 860bea158b47..5553c104d988 100644 --- a/clients/client-pipes/package.json +++ b/clients/client-pipes/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-pipes/src/PipesClient.ts b/clients/client-pipes/src/PipesClient.ts index 1c0db94cb1cb..b67b7489d97b 100644 --- a/clients/client-pipes/src/PipesClient.ts +++ b/clients/client-pipes/src/PipesClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -110,11 +110,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-pipes/src/runtimeConfig.browser.ts b/clients/client-pipes/src/runtimeConfig.browser.ts index 11912cb86581..3830ff3e5497 100644 --- a/clients/client-pipes/src/runtimeConfig.browser.ts +++ b/clients/client-pipes/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PipesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-pipes/src/runtimeConfig.ts b/clients/client-pipes/src/runtimeConfig.ts index 859af2041fdb..7d20e6a013fd 100644 --- a/clients/client-pipes/src/runtimeConfig.ts +++ b/clients/client-pipes/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PipesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-polly/package.json b/clients/client-polly/package.json index 3ce63e76a379..2e23aa249d7b 100644 --- a/clients/client-polly/package.json +++ b/clients/client-polly/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-polly/src/PollyClient.ts b/clients/client-polly/src/PollyClient.ts index 040441990525..a1061e2b9709 100644 --- a/clients/client-polly/src/PollyClient.ts +++ b/clients/client-polly/src/PollyClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -114,11 +114,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-polly/src/runtimeConfig.browser.ts b/clients/client-polly/src/runtimeConfig.browser.ts index 689f67ce6362..586cf9cfaf5d 100644 --- a/clients/client-polly/src/runtimeConfig.browser.ts +++ b/clients/client-polly/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PollyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-polly/src/runtimeConfig.ts b/clients/client-polly/src/runtimeConfig.ts index 9a0992c7731d..8c68bcf439a1 100644 --- a/clients/client-polly/src/runtimeConfig.ts +++ b/clients/client-polly/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PollyClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-pricing/package.json b/clients/client-pricing/package.json index 4ed11f25735c..81776849c14d 100644 --- a/clients/client-pricing/package.json +++ b/clients/client-pricing/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-pricing/src/PricingClient.ts b/clients/client-pricing/src/PricingClient.ts index 449a320a8773..7e8db5bd3c23 100644 --- a/clients/client-pricing/src/PricingClient.ts +++ b/clients/client-pricing/src/PricingClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -95,11 +95,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-pricing/src/runtimeConfig.browser.ts b/clients/client-pricing/src/runtimeConfig.browser.ts index a8b4b59bce74..afef0c4dbaf9 100644 --- a/clients/client-pricing/src/runtimeConfig.browser.ts +++ b/clients/client-pricing/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PricingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-pricing/src/runtimeConfig.ts b/clients/client-pricing/src/runtimeConfig.ts index 56c2914c6480..5bd100549e0d 100644 --- a/clients/client-pricing/src/runtimeConfig.ts +++ b/clients/client-pricing/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PricingClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-privatenetworks/package.json b/clients/client-privatenetworks/package.json index 21556f10a816..176ba30125f9 100644 --- a/clients/client-privatenetworks/package.json +++ b/clients/client-privatenetworks/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-privatenetworks/src/PrivateNetworksClient.ts b/clients/client-privatenetworks/src/PrivateNetworksClient.ts index 0a50fdf1bb81..93bd7e1fa3ef 100644 --- a/clients/client-privatenetworks/src/PrivateNetworksClient.ts +++ b/clients/client-privatenetworks/src/PrivateNetworksClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -188,11 +188,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-privatenetworks/src/runtimeConfig.browser.ts b/clients/client-privatenetworks/src/runtimeConfig.browser.ts index 9267a8cad345..365ea45885ca 100644 --- a/clients/client-privatenetworks/src/runtimeConfig.browser.ts +++ b/clients/client-privatenetworks/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: PrivateNetworksClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-privatenetworks/src/runtimeConfig.ts b/clients/client-privatenetworks/src/runtimeConfig.ts index f3fdf46088e9..ee2575777dd2 100644 --- a/clients/client-privatenetworks/src/runtimeConfig.ts +++ b/clients/client-privatenetworks/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: PrivateNetworksClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-proton/package.json b/clients/client-proton/package.json index d1a0ab454aac..c3029b32c7ad 100644 --- a/clients/client-proton/package.json +++ b/clients/client-proton/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-proton/src/ProtonClient.ts b/clients/client-proton/src/ProtonClient.ts index a09de4af81d1..0abaf2077c8a 100644 --- a/clients/client-proton/src/ProtonClient.ts +++ b/clients/client-proton/src/ProtonClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -518,11 +518,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-proton/src/runtimeConfig.browser.ts b/clients/client-proton/src/runtimeConfig.browser.ts index 1ff7f2d6ee00..c40e7cb42ca0 100644 --- a/clients/client-proton/src/runtimeConfig.browser.ts +++ b/clients/client-proton/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ProtonClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-proton/src/runtimeConfig.ts b/clients/client-proton/src/runtimeConfig.ts index dd51c0865ee7..f744a71a5474 100644 --- a/clients/client-proton/src/runtimeConfig.ts +++ b/clients/client-proton/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ProtonClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-qbusiness/package.json b/clients/client-qbusiness/package.json index a21ee037dfe0..7e1b35ca94bc 100644 --- a/clients/client-qbusiness/package.json +++ b/clients/client-qbusiness/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-qbusiness/src/QBusinessClient.ts b/clients/client-qbusiness/src/QBusinessClient.ts index 49478debd3bd..6220dcf286b5 100644 --- a/clients/client-qbusiness/src/QBusinessClient.ts +++ b/clients/client-qbusiness/src/QBusinessClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -275,11 +275,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-qbusiness/src/runtimeConfig.browser.ts b/clients/client-qbusiness/src/runtimeConfig.browser.ts index 3827c8af6d93..524224d60611 100644 --- a/clients/client-qbusiness/src/runtimeConfig.browser.ts +++ b/clients/client-qbusiness/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: QBusinessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-qbusiness/src/runtimeConfig.ts b/clients/client-qbusiness/src/runtimeConfig.ts index 8bc069b5407b..1b70bb7f3cec 100644 --- a/clients/client-qbusiness/src/runtimeConfig.ts +++ b/clients/client-qbusiness/src/runtimeConfig.ts @@ -44,9 +44,9 @@ export const getRuntimeConfig = (config: QBusinessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: - config?.requestHandler ?? - new RequestHandler(async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })), + requestHandler: RequestHandler.create( + config?.requestHandler ?? (async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })) + ), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-qconnect/package.json b/clients/client-qconnect/package.json index abb1578f5060..b95c667b0a63 100644 --- a/clients/client-qconnect/package.json +++ b/clients/client-qconnect/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-qconnect/src/QConnectClient.ts b/clients/client-qconnect/src/QConnectClient.ts index e9ebf3aeb090..208f01722af7 100644 --- a/clients/client-qconnect/src/QConnectClient.ts +++ b/clients/client-qconnect/src/QConnectClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -245,11 +245,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-qconnect/src/runtimeConfig.browser.ts b/clients/client-qconnect/src/runtimeConfig.browser.ts index bc49b0f54128..5feeb414d85c 100644 --- a/clients/client-qconnect/src/runtimeConfig.browser.ts +++ b/clients/client-qconnect/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: QConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-qconnect/src/runtimeConfig.ts b/clients/client-qconnect/src/runtimeConfig.ts index 97725765871b..a5049dce0e5d 100644 --- a/clients/client-qconnect/src/runtimeConfig.ts +++ b/clients/client-qconnect/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: QConnectClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-qldb-session/package.json b/clients/client-qldb-session/package.json index 4310d0c30daf..18c86f09ddaf 100644 --- a/clients/client-qldb-session/package.json +++ b/clients/client-qldb-session/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-qldb-session/src/QLDBSessionClient.ts b/clients/client-qldb-session/src/QLDBSessionClient.ts index 5f04e48dbc05..15a31f45e110 100644 --- a/clients/client-qldb-session/src/QLDBSessionClient.ts +++ b/clients/client-qldb-session/src/QLDBSessionClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -78,11 +78,11 @@ export type ServiceOutputTypes = SendCommandCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-qldb-session/src/runtimeConfig.browser.ts b/clients/client-qldb-session/src/runtimeConfig.browser.ts index e3452e084ab6..3cf75daa6905 100644 --- a/clients/client-qldb-session/src/runtimeConfig.browser.ts +++ b/clients/client-qldb-session/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: QLDBSessionClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-qldb-session/src/runtimeConfig.ts b/clients/client-qldb-session/src/runtimeConfig.ts index 7ca6c756114e..8d6aeb23c36c 100644 --- a/clients/client-qldb-session/src/runtimeConfig.ts +++ b/clients/client-qldb-session/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: QLDBSessionClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-qldb/package.json b/clients/client-qldb/package.json index b84c29c0c83e..314065769d05 100644 --- a/clients/client-qldb/package.json +++ b/clients/client-qldb/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-qldb/src/QLDBClient.ts b/clients/client-qldb/src/QLDBClient.ts index 3619723aa6f1..872be5f181fb 100644 --- a/clients/client-qldb/src/QLDBClient.ts +++ b/clients/client-qldb/src/QLDBClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -164,11 +164,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-qldb/src/runtimeConfig.browser.ts b/clients/client-qldb/src/runtimeConfig.browser.ts index 6e276d346b3a..b1b23b3ecb29 100644 --- a/clients/client-qldb/src/runtimeConfig.browser.ts +++ b/clients/client-qldb/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: QLDBClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-qldb/src/runtimeConfig.ts b/clients/client-qldb/src/runtimeConfig.ts index 11344983c631..2728ecac90a3 100644 --- a/clients/client-qldb/src/runtimeConfig.ts +++ b/clients/client-qldb/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: QLDBClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-quicksight/package.json b/clients/client-quicksight/package.json index e232dc921b3c..f6c0d888574b 100644 --- a/clients/client-quicksight/package.json +++ b/clients/client-quicksight/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-quicksight/src/QuickSightClient.ts b/clients/client-quicksight/src/QuickSightClient.ts index ddd07d59a6a4..1c5210cb251a 100644 --- a/clients/client-quicksight/src/QuickSightClient.ts +++ b/clients/client-quicksight/src/QuickSightClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -872,11 +872,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-quicksight/src/runtimeConfig.browser.ts b/clients/client-quicksight/src/runtimeConfig.browser.ts index b5b494773de4..4b1a350a90b7 100644 --- a/clients/client-quicksight/src/runtimeConfig.browser.ts +++ b/clients/client-quicksight/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: QuickSightClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-quicksight/src/runtimeConfig.ts b/clients/client-quicksight/src/runtimeConfig.ts index 6a1a16e1ce8f..746863a4c1ef 100644 --- a/clients/client-quicksight/src/runtimeConfig.ts +++ b/clients/client-quicksight/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: QuickSightClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ram/package.json b/clients/client-ram/package.json index a918b471573c..b301c80eeac8 100644 --- a/clients/client-ram/package.json +++ b/clients/client-ram/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-ram/src/RAMClient.ts b/clients/client-ram/src/RAMClient.ts index 80cf9e6769cc..1c04e2fe8532 100644 --- a/clients/client-ram/src/RAMClient.ts +++ b/clients/client-ram/src/RAMClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -251,11 +251,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ram/src/runtimeConfig.browser.ts b/clients/client-ram/src/runtimeConfig.browser.ts index 7d742ad47fd7..60abe90072e7 100644 --- a/clients/client-ram/src/runtimeConfig.browser.ts +++ b/clients/client-ram/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RAMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ram/src/runtimeConfig.ts b/clients/client-ram/src/runtimeConfig.ts index 60287cf7abce..c9548f9e973b 100644 --- a/clients/client-ram/src/runtimeConfig.ts +++ b/clients/client-ram/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RAMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-rbin/package.json b/clients/client-rbin/package.json index a2d344421e4a..7bcecf6ab505 100644 --- a/clients/client-rbin/package.json +++ b/clients/client-rbin/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-rbin/src/RbinClient.ts b/clients/client-rbin/src/RbinClient.ts index 6b09593e9b5e..d6ab6a82ed33 100644 --- a/clients/client-rbin/src/RbinClient.ts +++ b/clients/client-rbin/src/RbinClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -110,11 +110,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-rbin/src/runtimeConfig.browser.ts b/clients/client-rbin/src/runtimeConfig.browser.ts index fddbf113a3b1..011d070891d3 100644 --- a/clients/client-rbin/src/runtimeConfig.browser.ts +++ b/clients/client-rbin/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RbinClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-rbin/src/runtimeConfig.ts b/clients/client-rbin/src/runtimeConfig.ts index 42a414b5333a..4cd0f10ef536 100644 --- a/clients/client-rbin/src/runtimeConfig.ts +++ b/clients/client-rbin/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RbinClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-rds-data/package.json b/clients/client-rds-data/package.json index 0ae65b6ed683..72acb743d08c 100644 --- a/clients/client-rds-data/package.json +++ b/clients/client-rds-data/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-rds-data/src/RDSDataClient.ts b/clients/client-rds-data/src/RDSDataClient.ts index fee3b7343f29..8f11182ad4f3 100644 --- a/clients/client-rds-data/src/RDSDataClient.ts +++ b/clients/client-rds-data/src/RDSDataClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -101,11 +101,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-rds-data/src/runtimeConfig.browser.ts b/clients/client-rds-data/src/runtimeConfig.browser.ts index f4e68d2f7bcc..5e3d741ccb18 100644 --- a/clients/client-rds-data/src/runtimeConfig.browser.ts +++ b/clients/client-rds-data/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RDSDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-rds-data/src/runtimeConfig.ts b/clients/client-rds-data/src/runtimeConfig.ts index 4e4fc48f9c34..b78ed08d91f4 100644 --- a/clients/client-rds-data/src/runtimeConfig.ts +++ b/clients/client-rds-data/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RDSDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-rds/package.json b/clients/client-rds/package.json index 74eaa139c63d..d5b4b9e34a67 100644 --- a/clients/client-rds/package.json +++ b/clients/client-rds/package.json @@ -33,32 +33,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-rds/src/RDSClient.ts b/clients/client-rds/src/RDSClient.ts index 3873d3d25182..ff22d09fbd9d 100644 --- a/clients/client-rds/src/RDSClient.ts +++ b/clients/client-rds/src/RDSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -914,11 +914,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-rds/src/runtimeConfig.browser.ts b/clients/client-rds/src/runtimeConfig.browser.ts index 04b6b4c43768..36886422d329 100644 --- a/clients/client-rds/src/runtimeConfig.browser.ts +++ b/clients/client-rds/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RDSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-rds/src/runtimeConfig.ts b/clients/client-rds/src/runtimeConfig.ts index d70df1f1c228..cd2f5abe6676 100644 --- a/clients/client-rds/src/runtimeConfig.ts +++ b/clients/client-rds/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RDSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-redshift-data/package.json b/clients/client-redshift-data/package.json index be76d9b02ac3..40fe17a1325e 100644 --- a/clients/client-redshift-data/package.json +++ b/clients/client-redshift-data/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-redshift-data/src/RedshiftDataClient.ts b/clients/client-redshift-data/src/RedshiftDataClient.ts index 847d15112a4d..f4c759054714 100644 --- a/clients/client-redshift-data/src/RedshiftDataClient.ts +++ b/clients/client-redshift-data/src/RedshiftDataClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -110,11 +110,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-redshift-data/src/runtimeConfig.browser.ts b/clients/client-redshift-data/src/runtimeConfig.browser.ts index 148354237d0a..40290ac831ea 100644 --- a/clients/client-redshift-data/src/runtimeConfig.browser.ts +++ b/clients/client-redshift-data/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RedshiftDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-redshift-data/src/runtimeConfig.ts b/clients/client-redshift-data/src/runtimeConfig.ts index 29a4aedf0b72..3c78febca3eb 100644 --- a/clients/client-redshift-data/src/runtimeConfig.ts +++ b/clients/client-redshift-data/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RedshiftDataClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-redshift-serverless/package.json b/clients/client-redshift-serverless/package.json index 156f63fe9339..c89af8731b29 100644 --- a/clients/client-redshift-serverless/package.json +++ b/clients/client-redshift-serverless/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-redshift-serverless/src/RedshiftServerlessClient.ts b/clients/client-redshift-serverless/src/RedshiftServerlessClient.ts index f17487321fb8..6c7913f3f7a4 100644 --- a/clients/client-redshift-serverless/src/RedshiftServerlessClient.ts +++ b/clients/client-redshift-serverless/src/RedshiftServerlessClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -317,11 +317,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-redshift-serverless/src/runtimeConfig.browser.ts b/clients/client-redshift-serverless/src/runtimeConfig.browser.ts index 2674934e6a99..8c2affda92f0 100644 --- a/clients/client-redshift-serverless/src/runtimeConfig.browser.ts +++ b/clients/client-redshift-serverless/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RedshiftServerlessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-redshift-serverless/src/runtimeConfig.ts b/clients/client-redshift-serverless/src/runtimeConfig.ts index 9836721cecfd..63ec5ffffd55 100644 --- a/clients/client-redshift-serverless/src/runtimeConfig.ts +++ b/clients/client-redshift-serverless/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RedshiftServerlessClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-redshift/package.json b/clients/client-redshift/package.json index 62ce0ae99d6d..a564c170c133 100644 --- a/clients/client-redshift/package.json +++ b/clients/client-redshift/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-redshift/src/RedshiftClient.ts b/clients/client-redshift/src/RedshiftClient.ts index 7c3ec8b24dbb..9f7a84ad1d15 100644 --- a/clients/client-redshift/src/RedshiftClient.ts +++ b/clients/client-redshift/src/RedshiftClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -788,11 +788,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-redshift/src/runtimeConfig.browser.ts b/clients/client-redshift/src/runtimeConfig.browser.ts index 69e76e15efaf..8b1066cdcf3a 100644 --- a/clients/client-redshift/src/runtimeConfig.browser.ts +++ b/clients/client-redshift/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RedshiftClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-redshift/src/runtimeConfig.ts b/clients/client-redshift/src/runtimeConfig.ts index 236637a5f529..64e688276028 100644 --- a/clients/client-redshift/src/runtimeConfig.ts +++ b/clients/client-redshift/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RedshiftClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-rekognition/package.json b/clients/client-rekognition/package.json index dbe378ddba54..f4d2d401fd45 100644 --- a/clients/client-rekognition/package.json +++ b/clients/client-rekognition/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-rekognition/src/RekognitionClient.ts b/clients/client-rekognition/src/RekognitionClient.ts index feeaa369b848..91d7c18918d5 100644 --- a/clients/client-rekognition/src/RekognitionClient.ts +++ b/clients/client-rekognition/src/RekognitionClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -398,11 +398,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-rekognition/src/runtimeConfig.browser.ts b/clients/client-rekognition/src/runtimeConfig.browser.ts index 1c2fe26e323c..9689280361dc 100644 --- a/clients/client-rekognition/src/runtimeConfig.browser.ts +++ b/clients/client-rekognition/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RekognitionClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-rekognition/src/runtimeConfig.ts b/clients/client-rekognition/src/runtimeConfig.ts index fb3605199d1c..b73f9a977785 100644 --- a/clients/client-rekognition/src/runtimeConfig.ts +++ b/clients/client-rekognition/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RekognitionClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-rekognitionstreaming/package.json b/clients/client-rekognitionstreaming/package.json index 94883f7685fe..20d938d91718 100644 --- a/clients/client-rekognitionstreaming/package.json +++ b/clients/client-rekognitionstreaming/package.json @@ -36,32 +36,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-rekognitionstreaming/src/RekognitionStreamingClient.ts b/clients/client-rekognitionstreaming/src/RekognitionStreamingClient.ts index 3b85f75c7672..dca8252b5dc6 100644 --- a/clients/client-rekognitionstreaming/src/RekognitionStreamingClient.ts +++ b/clients/client-rekognitionstreaming/src/RekognitionStreamingClient.ts @@ -38,7 +38,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -91,11 +91,11 @@ export type ServiceOutputTypes = StartFaceLivenessSessionCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-rekognitionstreaming/src/runtimeConfig.browser.ts b/clients/client-rekognitionstreaming/src/runtimeConfig.browser.ts index c85ebeace389..1dececc9e991 100644 --- a/clients/client-rekognitionstreaming/src/runtimeConfig.browser.ts +++ b/clients/client-rekognitionstreaming/src/runtimeConfig.browser.ts @@ -4,6 +4,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; import { + WebSocketFetchHandlerOptions, WebSocketFetchHandler as WebSocketRequestHandler, eventStreamPayloadHandlerProvider, } from "@aws-sdk/middleware-websocket"; @@ -41,9 +42,13 @@ export const getRuntimeConfig = (config: RekognitionStreamingClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: - config?.requestHandler ?? - new WebSocketRequestHandler(defaultConfigProvider, new HttpRequestHandler(defaultConfigProvider)), + requestHandler: WebSocketRequestHandler.create( + (config?.requestHandler as + | WebSocketRequestHandler + | WebSocketFetchHandlerOptions + | (() => Promise)) ?? defaultConfigProvider, + HttpRequestHandler.create(defaultConfigProvider) + ), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-rekognitionstreaming/src/runtimeConfig.ts b/clients/client-rekognitionstreaming/src/runtimeConfig.ts index 21d14164e66b..d5d51ca08941 100644 --- a/clients/client-rekognitionstreaming/src/runtimeConfig.ts +++ b/clients/client-rekognitionstreaming/src/runtimeConfig.ts @@ -48,7 +48,7 @@ export const getRuntimeConfig = (config: RekognitionStreamingClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-repostspace/package.json b/clients/client-repostspace/package.json index eb4c30e38b65..64f763c5c0e5 100644 --- a/clients/client-repostspace/package.json +++ b/clients/client-repostspace/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-repostspace/src/RepostspaceClient.ts b/clients/client-repostspace/src/RepostspaceClient.ts index b15d08b0cbc2..0ea9afdb65ef 100644 --- a/clients/client-repostspace/src/RepostspaceClient.ts +++ b/clients/client-repostspace/src/RepostspaceClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -113,11 +113,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-repostspace/src/runtimeConfig.browser.ts b/clients/client-repostspace/src/runtimeConfig.browser.ts index f3296b3628e6..c200287f2e42 100644 --- a/clients/client-repostspace/src/runtimeConfig.browser.ts +++ b/clients/client-repostspace/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RepostspaceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-repostspace/src/runtimeConfig.ts b/clients/client-repostspace/src/runtimeConfig.ts index 0d61f28f034f..da61d596aaaf 100644 --- a/clients/client-repostspace/src/runtimeConfig.ts +++ b/clients/client-repostspace/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RepostspaceClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-resiliencehub/package.json b/clients/client-resiliencehub/package.json index 88c625b13d4e..e326021e28cb 100644 --- a/clients/client-resiliencehub/package.json +++ b/clients/client-resiliencehub/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-resiliencehub/src/ResiliencehubClient.ts b/clients/client-resiliencehub/src/ResiliencehubClient.ts index 8cf70fb5831f..7919e7eee9d1 100644 --- a/clients/client-resiliencehub/src/ResiliencehubClient.ts +++ b/clients/client-resiliencehub/src/ResiliencehubClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -362,11 +362,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-resiliencehub/src/runtimeConfig.browser.ts b/clients/client-resiliencehub/src/runtimeConfig.browser.ts index e31478b3738a..496768e6f56c 100644 --- a/clients/client-resiliencehub/src/runtimeConfig.browser.ts +++ b/clients/client-resiliencehub/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ResiliencehubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-resiliencehub/src/runtimeConfig.ts b/clients/client-resiliencehub/src/runtimeConfig.ts index 1b1d2770e358..74370bb22dec 100644 --- a/clients/client-resiliencehub/src/runtimeConfig.ts +++ b/clients/client-resiliencehub/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ResiliencehubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-resource-explorer-2/package.json b/clients/client-resource-explorer-2/package.json index 59635a2528c6..795bc178c381 100644 --- a/clients/client-resource-explorer-2/package.json +++ b/clients/client-resource-explorer-2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-resource-explorer-2/src/ResourceExplorer2Client.ts b/clients/client-resource-explorer-2/src/ResourceExplorer2Client.ts index dc364fdbca46..26241960ecd0 100644 --- a/clients/client-resource-explorer-2/src/ResourceExplorer2Client.ts +++ b/clients/client-resource-explorer-2/src/ResourceExplorer2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -158,11 +158,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-resource-explorer-2/src/runtimeConfig.browser.ts b/clients/client-resource-explorer-2/src/runtimeConfig.browser.ts index f88eee1eacab..3b62cf9ebbac 100644 --- a/clients/client-resource-explorer-2/src/runtimeConfig.browser.ts +++ b/clients/client-resource-explorer-2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ResourceExplorer2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-resource-explorer-2/src/runtimeConfig.ts b/clients/client-resource-explorer-2/src/runtimeConfig.ts index 23178d3cb144..2bd49cb25a8b 100644 --- a/clients/client-resource-explorer-2/src/runtimeConfig.ts +++ b/clients/client-resource-explorer-2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ResourceExplorer2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-resource-groups-tagging-api/package.json b/clients/client-resource-groups-tagging-api/package.json index c79cab897b54..fb5193b0ab02 100644 --- a/clients/client-resource-groups-tagging-api/package.json +++ b/clients/client-resource-groups-tagging-api/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPIClient.ts b/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPIClient.ts index 4589963ca703..8760cdcb624c 100644 --- a/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPIClient.ts +++ b/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPIClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -110,11 +110,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-resource-groups-tagging-api/src/runtimeConfig.browser.ts b/clients/client-resource-groups-tagging-api/src/runtimeConfig.browser.ts index 93a895377935..994ed288b2e3 100644 --- a/clients/client-resource-groups-tagging-api/src/runtimeConfig.browser.ts +++ b/clients/client-resource-groups-tagging-api/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ResourceGroupsTaggingAPIClientConfig) = defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-resource-groups-tagging-api/src/runtimeConfig.ts b/clients/client-resource-groups-tagging-api/src/runtimeConfig.ts index bce18c6070b9..0efedfbad0f9 100644 --- a/clients/client-resource-groups-tagging-api/src/runtimeConfig.ts +++ b/clients/client-resource-groups-tagging-api/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ResourceGroupsTaggingAPIClientConfig) = defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-resource-groups/package.json b/clients/client-resource-groups/package.json index 0d9117c88c27..0b1d5913e089 100644 --- a/clients/client-resource-groups/package.json +++ b/clients/client-resource-groups/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-resource-groups/src/ResourceGroupsClient.ts b/clients/client-resource-groups/src/ResourceGroupsClient.ts index 7c27d4d23486..1f476cd681f7 100644 --- a/clients/client-resource-groups/src/ResourceGroupsClient.ts +++ b/clients/client-resource-groups/src/ResourceGroupsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -140,11 +140,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-resource-groups/src/runtimeConfig.browser.ts b/clients/client-resource-groups/src/runtimeConfig.browser.ts index f643b7770586..7961bc2e532e 100644 --- a/clients/client-resource-groups/src/runtimeConfig.browser.ts +++ b/clients/client-resource-groups/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ResourceGroupsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-resource-groups/src/runtimeConfig.ts b/clients/client-resource-groups/src/runtimeConfig.ts index 655b4176c52d..e8739175a5f8 100644 --- a/clients/client-resource-groups/src/runtimeConfig.ts +++ b/clients/client-resource-groups/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ResourceGroupsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-robomaker/package.json b/clients/client-robomaker/package.json index c04bdca347ea..957456de63b0 100644 --- a/clients/client-robomaker/package.json +++ b/clients/client-robomaker/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-robomaker/src/RoboMakerClient.ts b/clients/client-robomaker/src/RoboMakerClient.ts index c398362058fb..218f5bdb3781 100644 --- a/clients/client-robomaker/src/RoboMakerClient.ts +++ b/clients/client-robomaker/src/RoboMakerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -362,11 +362,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-robomaker/src/runtimeConfig.browser.ts b/clients/client-robomaker/src/runtimeConfig.browser.ts index 9812ca46dcc7..d861dd19177d 100644 --- a/clients/client-robomaker/src/runtimeConfig.browser.ts +++ b/clients/client-robomaker/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RoboMakerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-robomaker/src/runtimeConfig.ts b/clients/client-robomaker/src/runtimeConfig.ts index e746eaa82bf5..c069394a0149 100644 --- a/clients/client-robomaker/src/runtimeConfig.ts +++ b/clients/client-robomaker/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RoboMakerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-rolesanywhere/package.json b/clients/client-rolesanywhere/package.json index 69469f2d22fe..3a440463a4fa 100644 --- a/clients/client-rolesanywhere/package.json +++ b/clients/client-rolesanywhere/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-rolesanywhere/src/RolesAnywhereClient.ts b/clients/client-rolesanywhere/src/RolesAnywhereClient.ts index a9c9e26e6084..450d8234c09e 100644 --- a/clients/client-rolesanywhere/src/RolesAnywhereClient.ts +++ b/clients/client-rolesanywhere/src/RolesAnywhereClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -170,11 +170,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-rolesanywhere/src/runtimeConfig.browser.ts b/clients/client-rolesanywhere/src/runtimeConfig.browser.ts index 8b7da01c501d..c0dcc2581e35 100644 --- a/clients/client-rolesanywhere/src/runtimeConfig.browser.ts +++ b/clients/client-rolesanywhere/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RolesAnywhereClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-rolesanywhere/src/runtimeConfig.ts b/clients/client-rolesanywhere/src/runtimeConfig.ts index e78c51018fa1..9ef183deec71 100644 --- a/clients/client-rolesanywhere/src/runtimeConfig.ts +++ b/clients/client-rolesanywhere/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RolesAnywhereClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-route-53-domains/package.json b/clients/client-route-53-domains/package.json index bb17ec3af6d9..a8b33e0431bb 100644 --- a/clients/client-route-53-domains/package.json +++ b/clients/client-route-53-domains/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-route-53-domains/src/Route53DomainsClient.ts b/clients/client-route-53-domains/src/Route53DomainsClient.ts index 14a9d80d4ad2..d460175a8022 100644 --- a/clients/client-route-53-domains/src/Route53DomainsClient.ts +++ b/clients/client-route-53-domains/src/Route53DomainsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -245,11 +245,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-route-53-domains/src/runtimeConfig.browser.ts b/clients/client-route-53-domains/src/runtimeConfig.browser.ts index 25fd99aa0ce3..5e89fcaa47a8 100644 --- a/clients/client-route-53-domains/src/runtimeConfig.browser.ts +++ b/clients/client-route-53-domains/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: Route53DomainsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-route-53-domains/src/runtimeConfig.ts b/clients/client-route-53-domains/src/runtimeConfig.ts index 44d58912bcd7..6cdea73e365b 100644 --- a/clients/client-route-53-domains/src/runtimeConfig.ts +++ b/clients/client-route-53-domains/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: Route53DomainsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-route-53/package.json b/clients/client-route-53/package.json index 5e75572237ce..e1b7986f8435 100644 --- a/clients/client-route-53/package.json +++ b/clients/client-route-53/package.json @@ -34,32 +34,32 @@ "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", "@aws-sdk/xml-builder": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-route-53/src/Route53Client.ts b/clients/client-route-53/src/Route53Client.ts index 8ee9b8a5981f..b8b82445d8aa 100644 --- a/clients/client-route-53/src/Route53Client.ts +++ b/clients/client-route-53/src/Route53Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -434,11 +434,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-route-53/src/runtimeConfig.browser.ts b/clients/client-route-53/src/runtimeConfig.browser.ts index 913de5a6a7de..24978f68d8cd 100644 --- a/clients/client-route-53/src/runtimeConfig.browser.ts +++ b/clients/client-route-53/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: Route53ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-route-53/src/runtimeConfig.ts b/clients/client-route-53/src/runtimeConfig.ts index e8f2ca32da89..8c63253a9060 100644 --- a/clients/client-route-53/src/runtimeConfig.ts +++ b/clients/client-route-53/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: Route53ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-route53-recovery-cluster/package.json b/clients/client-route53-recovery-cluster/package.json index 3b1d62b7e6b1..fc4d753aacf0 100644 --- a/clients/client-route53-recovery-cluster/package.json +++ b/clients/client-route53-recovery-cluster/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-route53-recovery-cluster/src/Route53RecoveryClusterClient.ts b/clients/client-route53-recovery-cluster/src/Route53RecoveryClusterClient.ts index 30bfe95cc209..b2d6574d1529 100644 --- a/clients/client-route53-recovery-cluster/src/Route53RecoveryClusterClient.ts +++ b/clients/client-route53-recovery-cluster/src/Route53RecoveryClusterClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -101,11 +101,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-route53-recovery-cluster/src/runtimeConfig.browser.ts b/clients/client-route53-recovery-cluster/src/runtimeConfig.browser.ts index 851b1d7346a7..78914daa6db6 100644 --- a/clients/client-route53-recovery-cluster/src/runtimeConfig.browser.ts +++ b/clients/client-route53-recovery-cluster/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: Route53RecoveryClusterClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-route53-recovery-cluster/src/runtimeConfig.ts b/clients/client-route53-recovery-cluster/src/runtimeConfig.ts index 33aa21d2b996..9fe19b5bb07b 100644 --- a/clients/client-route53-recovery-cluster/src/runtimeConfig.ts +++ b/clients/client-route53-recovery-cluster/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: Route53RecoveryClusterClientConfig) => defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-route53-recovery-control-config/package.json b/clients/client-route53-recovery-control-config/package.json index c7a0d22441ec..26d1f08a3f4d 100644 --- a/clients/client-route53-recovery-control-config/package.json +++ b/clients/client-route53-recovery-control-config/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-route53-recovery-control-config/src/Route53RecoveryControlConfigClient.ts b/clients/client-route53-recovery-control-config/src/Route53RecoveryControlConfigClient.ts index 31be9ddb1dd6..fca04cbe93ff 100644 --- a/clients/client-route53-recovery-control-config/src/Route53RecoveryControlConfigClient.ts +++ b/clients/client-route53-recovery-control-config/src/Route53RecoveryControlConfigClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -173,11 +173,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-route53-recovery-control-config/src/runtimeConfig.browser.ts b/clients/client-route53-recovery-control-config/src/runtimeConfig.browser.ts index d88dc3da9b53..2f4845451995 100644 --- a/clients/client-route53-recovery-control-config/src/runtimeConfig.browser.ts +++ b/clients/client-route53-recovery-control-config/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: Route53RecoveryControlConfigClientConfi defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-route53-recovery-control-config/src/runtimeConfig.ts b/clients/client-route53-recovery-control-config/src/runtimeConfig.ts index 1e91898bcc5e..bbae70d4bf6a 100644 --- a/clients/client-route53-recovery-control-config/src/runtimeConfig.ts +++ b/clients/client-route53-recovery-control-config/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: Route53RecoveryControlConfigClientConfi defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-route53-recovery-readiness/package.json b/clients/client-route53-recovery-readiness/package.json index 3c9e97804d5e..dbb559d24408 100644 --- a/clients/client-route53-recovery-readiness/package.json +++ b/clients/client-route53-recovery-readiness/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-route53-recovery-readiness/src/Route53RecoveryReadinessClient.ts b/clients/client-route53-recovery-readiness/src/Route53RecoveryReadinessClient.ts index 9be03e1fb52e..b1cc51b1b44b 100644 --- a/clients/client-route53-recovery-readiness/src/Route53RecoveryReadinessClient.ts +++ b/clients/client-route53-recovery-readiness/src/Route53RecoveryReadinessClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -221,11 +221,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-route53-recovery-readiness/src/runtimeConfig.browser.ts b/clients/client-route53-recovery-readiness/src/runtimeConfig.browser.ts index 842586099a89..d2c95d66dd79 100644 --- a/clients/client-route53-recovery-readiness/src/runtimeConfig.browser.ts +++ b/clients/client-route53-recovery-readiness/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: Route53RecoveryReadinessClientConfig) = defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-route53-recovery-readiness/src/runtimeConfig.ts b/clients/client-route53-recovery-readiness/src/runtimeConfig.ts index e892b48a9ddf..9cb582f5027e 100644 --- a/clients/client-route53-recovery-readiness/src/runtimeConfig.ts +++ b/clients/client-route53-recovery-readiness/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: Route53RecoveryReadinessClientConfig) = defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-route53resolver/package.json b/clients/client-route53resolver/package.json index 0566a3d7987b..1dfba2c05a79 100644 --- a/clients/client-route53resolver/package.json +++ b/clients/client-route53resolver/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-route53resolver/src/Route53ResolverClient.ts b/clients/client-route53resolver/src/Route53ResolverClient.ts index c0a7c318e32b..548d43522e9a 100644 --- a/clients/client-route53resolver/src/Route53ResolverClient.ts +++ b/clients/client-route53resolver/src/Route53ResolverClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -443,11 +443,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-route53resolver/src/runtimeConfig.browser.ts b/clients/client-route53resolver/src/runtimeConfig.browser.ts index d85c69543500..6d9d866ba24c 100644 --- a/clients/client-route53resolver/src/runtimeConfig.browser.ts +++ b/clients/client-route53resolver/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: Route53ResolverClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-route53resolver/src/runtimeConfig.ts b/clients/client-route53resolver/src/runtimeConfig.ts index c33e5665387d..058b9fdd47ef 100644 --- a/clients/client-route53resolver/src/runtimeConfig.ts +++ b/clients/client-route53resolver/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: Route53ResolverClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-rum/package.json b/clients/client-rum/package.json index ad0eef6d0fae..03818bc4159b 100644 --- a/clients/client-rum/package.json +++ b/clients/client-rum/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-rum/src/RUMClient.ts b/clients/client-rum/src/RUMClient.ts index 11cf1463bce7..5ae16d763174 100644 --- a/clients/client-rum/src/RUMClient.ts +++ b/clients/client-rum/src/RUMClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -152,11 +152,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-rum/src/runtimeConfig.browser.ts b/clients/client-rum/src/runtimeConfig.browser.ts index e54b78668b4f..3f82874ef83b 100644 --- a/clients/client-rum/src/runtimeConfig.browser.ts +++ b/clients/client-rum/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: RUMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-rum/src/runtimeConfig.ts b/clients/client-rum/src/runtimeConfig.ts index ca99a0d59f2c..c51101057994 100644 --- a/clients/client-rum/src/runtimeConfig.ts +++ b/clients/client-rum/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: RUMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-s3-control/package.json b/clients/client-s3-control/package.json index e56f1fefb967..fb04739116f9 100644 --- a/clients/client-s3-control/package.json +++ b/clients/client-s3-control/package.json @@ -36,34 +36,34 @@ "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", "@aws-sdk/xml-builder": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-blob-browser": "^2.1.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/hash-stream-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/md5-js": "^2.1.1", - "@smithy/middleware-apply-body-checksum": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-blob-browser": "^2.1.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/hash-stream-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/md5-js": "^2.1.2", + "@smithy/middleware-apply-body-checksum": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0", diff --git a/clients/client-s3-control/src/S3ControlClient.ts b/clients/client-s3-control/src/S3ControlClient.ts index be28a6b9add3..47dc5ee14534 100644 --- a/clients/client-s3-control/src/S3ControlClient.ts +++ b/clients/client-s3-control/src/S3ControlClient.ts @@ -28,7 +28,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -557,11 +557,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-s3-control/src/runtimeConfig.browser.ts b/clients/client-s3-control/src/runtimeConfig.browser.ts index 3d4b4266c291..bdfb8463d508 100644 --- a/clients/client-s3-control/src/runtimeConfig.browser.ts +++ b/clients/client-s3-control/src/runtimeConfig.browser.ts @@ -37,7 +37,7 @@ export const getRuntimeConfig = (config: S3ControlClientConfig) => { maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, md5: config?.md5 ?? Md5, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-s3-control/src/runtimeConfig.ts b/clients/client-s3-control/src/runtimeConfig.ts index 438295ce3678..6e60ad413801 100644 --- a/clients/client-s3-control/src/runtimeConfig.ts +++ b/clients/client-s3-control/src/runtimeConfig.ts @@ -46,7 +46,7 @@ export const getRuntimeConfig = (config: S3ControlClientConfig) => { maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), md5: config?.md5 ?? Hash.bind(null, "md5"), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-s3/package.json b/clients/client-s3/package.json index 43e0c1a2c385..5ae5aae16e55 100644 --- a/clients/client-s3/package.json +++ b/clients/client-s3/package.json @@ -47,38 +47,38 @@ "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", "@aws-sdk/xml-builder": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-blob-browser": "^2.1.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/hash-stream-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/md5-js": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-blob-browser": "^2.1.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/hash-stream-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/md5-js": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-s3/src/S3Client.ts b/clients/client-s3/src/S3Client.ts index f16b1d42e3b2..142369d79384 100644 --- a/clients/client-s3/src/S3Client.ts +++ b/clients/client-s3/src/S3Client.ts @@ -38,7 +38,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -540,11 +540,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-s3/src/runtimeConfig.browser.ts b/clients/client-s3/src/runtimeConfig.browser.ts index 7015b035fd41..7651945d8c1d 100644 --- a/clients/client-s3/src/runtimeConfig.browser.ts +++ b/clients/client-s3/src/runtimeConfig.browser.ts @@ -40,7 +40,7 @@ export const getRuntimeConfig = (config: S3ClientConfig) => { maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, md5: config?.md5 ?? Md5, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha1: config?.sha1 ?? Sha1, sha256: config?.sha256 ?? Sha256, diff --git a/clients/client-s3/src/runtimeConfig.ts b/clients/client-s3/src/runtimeConfig.ts index 2c3adf46423f..a029bd3e80b0 100644 --- a/clients/client-s3/src/runtimeConfig.ts +++ b/clients/client-s3/src/runtimeConfig.ts @@ -53,7 +53,7 @@ export const getRuntimeConfig = (config: S3ClientConfig) => { maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), md5: config?.md5 ?? Hash.bind(null, "md5"), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-s3outposts/package.json b/clients/client-s3outposts/package.json index 27ad12f19da7..d8cb408e5b4b 100644 --- a/clients/client-s3outposts/package.json +++ b/clients/client-s3outposts/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-s3outposts/src/S3OutpostsClient.ts b/clients/client-s3outposts/src/S3OutpostsClient.ts index 054e035bc7b5..50ddb45d3658 100644 --- a/clients/client-s3outposts/src/S3OutpostsClient.ts +++ b/clients/client-s3outposts/src/S3OutpostsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -95,11 +95,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-s3outposts/src/runtimeConfig.browser.ts b/clients/client-s3outposts/src/runtimeConfig.browser.ts index 769a4ce18952..b0b5bbaff9a5 100644 --- a/clients/client-s3outposts/src/runtimeConfig.browser.ts +++ b/clients/client-s3outposts/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: S3OutpostsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-s3outposts/src/runtimeConfig.ts b/clients/client-s3outposts/src/runtimeConfig.ts index 1b7d2337ec94..405d9717be53 100644 --- a/clients/client-s3outposts/src/runtimeConfig.ts +++ b/clients/client-s3outposts/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: S3OutpostsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sagemaker-a2i-runtime/package.json b/clients/client-sagemaker-a2i-runtime/package.json index 4131269ad14e..c5ed53e6cbb5 100644 --- a/clients/client-sagemaker-a2i-runtime/package.json +++ b/clients/client-sagemaker-a2i-runtime/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sagemaker-a2i-runtime/src/SageMakerA2IRuntimeClient.ts b/clients/client-sagemaker-a2i-runtime/src/SageMakerA2IRuntimeClient.ts index 01e1f57ec79c..8c981908719c 100644 --- a/clients/client-sagemaker-a2i-runtime/src/SageMakerA2IRuntimeClient.ts +++ b/clients/client-sagemaker-a2i-runtime/src/SageMakerA2IRuntimeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -92,11 +92,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.browser.ts b/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.browser.ts index 1744783faa05..d2ee764abd75 100644 --- a/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SageMakerA2IRuntimeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.ts b/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.ts index 7371c42e1796..54bd4c754ff8 100644 --- a/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.ts +++ b/clients/client-sagemaker-a2i-runtime/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SageMakerA2IRuntimeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sagemaker-edge/package.json b/clients/client-sagemaker-edge/package.json index 294519c15275..d3137e487e04 100644 --- a/clients/client-sagemaker-edge/package.json +++ b/clients/client-sagemaker-edge/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sagemaker-edge/src/SagemakerEdgeClient.ts b/clients/client-sagemaker-edge/src/SagemakerEdgeClient.ts index e49dd38cbd6f..34e0d0312465 100644 --- a/clients/client-sagemaker-edge/src/SagemakerEdgeClient.ts +++ b/clients/client-sagemaker-edge/src/SagemakerEdgeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -89,11 +89,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sagemaker-edge/src/runtimeConfig.browser.ts b/clients/client-sagemaker-edge/src/runtimeConfig.browser.ts index 204b6d49acbe..2777570dac13 100644 --- a/clients/client-sagemaker-edge/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-edge/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SagemakerEdgeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sagemaker-edge/src/runtimeConfig.ts b/clients/client-sagemaker-edge/src/runtimeConfig.ts index 2ac272d48a7d..2d49519fb67b 100644 --- a/clients/client-sagemaker-edge/src/runtimeConfig.ts +++ b/clients/client-sagemaker-edge/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SagemakerEdgeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sagemaker-featurestore-runtime/package.json b/clients/client-sagemaker-featurestore-runtime/package.json index adff246d2e7d..d9f560ba5035 100644 --- a/clients/client-sagemaker-featurestore-runtime/package.json +++ b/clients/client-sagemaker-featurestore-runtime/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sagemaker-featurestore-runtime/src/SageMakerFeatureStoreRuntimeClient.ts b/clients/client-sagemaker-featurestore-runtime/src/SageMakerFeatureStoreRuntimeClient.ts index d5d80671f313..c89dfc7c1273 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/SageMakerFeatureStoreRuntimeClient.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/SageMakerFeatureStoreRuntimeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -89,11 +89,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.browser.ts b/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.browser.ts index 33b14388b644..532d3bded321 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SageMakerFeatureStoreRuntimeClientConfi defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.ts b/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.ts index a7b506beb94e..4fcdd3f3c3d2 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SageMakerFeatureStoreRuntimeClientConfi defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sagemaker-geospatial/package.json b/clients/client-sagemaker-geospatial/package.json index 4c118203233b..740c390c067b 100644 --- a/clients/client-sagemaker-geospatial/package.json +++ b/clients/client-sagemaker-geospatial/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-sagemaker-geospatial/src/SageMakerGeospatialClient.ts b/clients/client-sagemaker-geospatial/src/SageMakerGeospatialClient.ts index 3e6f76d422c1..b2771a9753dc 100644 --- a/clients/client-sagemaker-geospatial/src/SageMakerGeospatialClient.ts +++ b/clients/client-sagemaker-geospatial/src/SageMakerGeospatialClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -183,11 +183,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sagemaker-geospatial/src/runtimeConfig.browser.ts b/clients/client-sagemaker-geospatial/src/runtimeConfig.browser.ts index 9ecd98093f6b..4d0b90410db9 100644 --- a/clients/client-sagemaker-geospatial/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-geospatial/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SageMakerGeospatialClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sagemaker-geospatial/src/runtimeConfig.ts b/clients/client-sagemaker-geospatial/src/runtimeConfig.ts index 413d52835d24..9d92bf4c7e59 100644 --- a/clients/client-sagemaker-geospatial/src/runtimeConfig.ts +++ b/clients/client-sagemaker-geospatial/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SageMakerGeospatialClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sagemaker-metrics/package.json b/clients/client-sagemaker-metrics/package.json index 835885a200c3..a440e649ee92 100644 --- a/clients/client-sagemaker-metrics/package.json +++ b/clients/client-sagemaker-metrics/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sagemaker-metrics/src/SageMakerMetricsClient.ts b/clients/client-sagemaker-metrics/src/SageMakerMetricsClient.ts index ea0fb97cff4f..217de81a9cdf 100644 --- a/clients/client-sagemaker-metrics/src/SageMakerMetricsClient.ts +++ b/clients/client-sagemaker-metrics/src/SageMakerMetricsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -78,11 +78,11 @@ export type ServiceOutputTypes = BatchPutMetricsCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sagemaker-metrics/src/runtimeConfig.browser.ts b/clients/client-sagemaker-metrics/src/runtimeConfig.browser.ts index 6fdb6630c1ac..fbcc06567f3e 100644 --- a/clients/client-sagemaker-metrics/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-metrics/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SageMakerMetricsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sagemaker-metrics/src/runtimeConfig.ts b/clients/client-sagemaker-metrics/src/runtimeConfig.ts index 3949f9bac470..76c053bf74ba 100644 --- a/clients/client-sagemaker-metrics/src/runtimeConfig.ts +++ b/clients/client-sagemaker-metrics/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SageMakerMetricsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sagemaker-runtime/package.json b/clients/client-sagemaker-runtime/package.json index 98472504b5ef..20518ab202c4 100644 --- a/clients/client-sagemaker-runtime/package.json +++ b/clients/client-sagemaker-runtime/package.json @@ -32,34 +32,34 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sagemaker-runtime/src/SageMakerRuntimeClient.ts b/clients/client-sagemaker-runtime/src/SageMakerRuntimeClient.ts index 996d869bea14..b1dc46839747 100644 --- a/clients/client-sagemaker-runtime/src/SageMakerRuntimeClient.ts +++ b/clients/client-sagemaker-runtime/src/SageMakerRuntimeClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -98,11 +98,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sagemaker-runtime/src/runtimeConfig.browser.ts b/clients/client-sagemaker-runtime/src/runtimeConfig.browser.ts index f780a14896ac..90df1db9d9fb 100644 --- a/clients/client-sagemaker-runtime/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-runtime/src/runtimeConfig.browser.ts @@ -36,7 +36,7 @@ export const getRuntimeConfig = (config: SageMakerRuntimeClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sagemaker-runtime/src/runtimeConfig.ts b/clients/client-sagemaker-runtime/src/runtimeConfig.ts index 1cc66e60cace..52891930a1a6 100644 --- a/clients/client-sagemaker-runtime/src/runtimeConfig.ts +++ b/clients/client-sagemaker-runtime/src/runtimeConfig.ts @@ -46,7 +46,7 @@ export const getRuntimeConfig = (config: SageMakerRuntimeClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sagemaker/package.json b/clients/client-sagemaker/package.json index 7dbf823464c2..4c680ecada78 100644 --- a/clients/client-sagemaker/package.json +++ b/clients/client-sagemaker/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-sagemaker/src/SageMakerClient.ts b/clients/client-sagemaker/src/SageMakerClient.ts index 18204692d0f4..823b79fb2461 100644 --- a/clients/client-sagemaker/src/SageMakerClient.ts +++ b/clients/client-sagemaker/src/SageMakerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -1529,11 +1529,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sagemaker/src/runtimeConfig.browser.ts b/clients/client-sagemaker/src/runtimeConfig.browser.ts index 4ac5f43a5851..02a372a7d30f 100644 --- a/clients/client-sagemaker/src/runtimeConfig.browser.ts +++ b/clients/client-sagemaker/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SageMakerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sagemaker/src/runtimeConfig.ts b/clients/client-sagemaker/src/runtimeConfig.ts index bdab15b3f0b9..158aca92a26d 100644 --- a/clients/client-sagemaker/src/runtimeConfig.ts +++ b/clients/client-sagemaker/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SageMakerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-savingsplans/package.json b/clients/client-savingsplans/package.json index 876aac9e9df1..c3999c0396a2 100644 --- a/clients/client-savingsplans/package.json +++ b/clients/client-savingsplans/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-savingsplans/src/SavingsplansClient.ts b/clients/client-savingsplans/src/SavingsplansClient.ts index 8ef69c488cda..2bff6d9ec1fd 100644 --- a/clients/client-savingsplans/src/SavingsplansClient.ts +++ b/clients/client-savingsplans/src/SavingsplansClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -122,11 +122,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-savingsplans/src/runtimeConfig.browser.ts b/clients/client-savingsplans/src/runtimeConfig.browser.ts index f259cbc29b3b..c32260a0f869 100644 --- a/clients/client-savingsplans/src/runtimeConfig.browser.ts +++ b/clients/client-savingsplans/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SavingsplansClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-savingsplans/src/runtimeConfig.ts b/clients/client-savingsplans/src/runtimeConfig.ts index b50f4c8db27b..bb8bee316015 100644 --- a/clients/client-savingsplans/src/runtimeConfig.ts +++ b/clients/client-savingsplans/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SavingsplansClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-scheduler/package.json b/clients/client-scheduler/package.json index 7b444a80f373..90495a091b19 100644 --- a/clients/client-scheduler/package.json +++ b/clients/client-scheduler/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-scheduler/src/SchedulerClient.ts b/clients/client-scheduler/src/SchedulerClient.ts index 7c28acf9c83b..629ed742116d 100644 --- a/clients/client-scheduler/src/SchedulerClient.ts +++ b/clients/client-scheduler/src/SchedulerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -122,11 +122,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-scheduler/src/runtimeConfig.browser.ts b/clients/client-scheduler/src/runtimeConfig.browser.ts index ad0c79586ed3..2c36ec966d91 100644 --- a/clients/client-scheduler/src/runtimeConfig.browser.ts +++ b/clients/client-scheduler/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SchedulerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-scheduler/src/runtimeConfig.ts b/clients/client-scheduler/src/runtimeConfig.ts index c99156fe472c..fb12ebbc4a3b 100644 --- a/clients/client-scheduler/src/runtimeConfig.ts +++ b/clients/client-scheduler/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SchedulerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-schemas/package.json b/clients/client-schemas/package.json index 538c6603baf3..9878cd6d6c02 100644 --- a/clients/client-schemas/package.json +++ b/clients/client-schemas/package.json @@ -32,33 +32,33 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-schemas/src/SchemasClient.ts b/clients/client-schemas/src/SchemasClient.ts index 5d24ab8c2c65..e4b68c9817b3 100644 --- a/clients/client-schemas/src/SchemasClient.ts +++ b/clients/client-schemas/src/SchemasClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -188,11 +188,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-schemas/src/runtimeConfig.browser.ts b/clients/client-schemas/src/runtimeConfig.browser.ts index db38c1a307bc..b39e53fc5ae4 100644 --- a/clients/client-schemas/src/runtimeConfig.browser.ts +++ b/clients/client-schemas/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SchemasClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-schemas/src/runtimeConfig.ts b/clients/client-schemas/src/runtimeConfig.ts index 512e3e945452..02e9a6d1ca21 100644 --- a/clients/client-schemas/src/runtimeConfig.ts +++ b/clients/client-schemas/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SchemasClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-secrets-manager/package.json b/clients/client-secrets-manager/package.json index 6a9171ac0970..153abbde4f5f 100644 --- a/clients/client-secrets-manager/package.json +++ b/clients/client-secrets-manager/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-secrets-manager/src/SecretsManagerClient.ts b/clients/client-secrets-manager/src/SecretsManagerClient.ts index e18708db6088..d235b05fad5c 100644 --- a/clients/client-secrets-manager/src/SecretsManagerClient.ts +++ b/clients/client-secrets-manager/src/SecretsManagerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -170,11 +170,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-secrets-manager/src/runtimeConfig.browser.ts b/clients/client-secrets-manager/src/runtimeConfig.browser.ts index c73ca70e4b74..cb876453a1b3 100644 --- a/clients/client-secrets-manager/src/runtimeConfig.browser.ts +++ b/clients/client-secrets-manager/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SecretsManagerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-secrets-manager/src/runtimeConfig.ts b/clients/client-secrets-manager/src/runtimeConfig.ts index ad17350f8bf7..abeb9c266a89 100644 --- a/clients/client-secrets-manager/src/runtimeConfig.ts +++ b/clients/client-secrets-manager/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SecretsManagerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-securityhub/package.json b/clients/client-securityhub/package.json index 298b7fc54afb..4875db92c52a 100644 --- a/clients/client-securityhub/package.json +++ b/clients/client-securityhub/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-securityhub/src/SecurityHubClient.ts b/clients/client-securityhub/src/SecurityHubClient.ts index 06716e8be77f..44fb29213f09 100644 --- a/clients/client-securityhub/src/SecurityHubClient.ts +++ b/clients/client-securityhub/src/SecurityHubClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -467,11 +467,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-securityhub/src/runtimeConfig.browser.ts b/clients/client-securityhub/src/runtimeConfig.browser.ts index 0effd1b2e15a..df0d50889840 100644 --- a/clients/client-securityhub/src/runtimeConfig.browser.ts +++ b/clients/client-securityhub/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SecurityHubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-securityhub/src/runtimeConfig.ts b/clients/client-securityhub/src/runtimeConfig.ts index d104e3e8746a..5807a68d18e9 100644 --- a/clients/client-securityhub/src/runtimeConfig.ts +++ b/clients/client-securityhub/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SecurityHubClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-securitylake/package.json b/clients/client-securitylake/package.json index 523bd4c61d23..06473bd9cb42 100644 --- a/clients/client-securitylake/package.json +++ b/clients/client-securitylake/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-securitylake/src/SecurityLakeClient.ts b/clients/client-securitylake/src/SecurityLakeClient.ts index 4c688e2859c8..f1b2fd7e6cd0 100644 --- a/clients/client-securitylake/src/SecurityLakeClient.ts +++ b/clients/client-securitylake/src/SecurityLakeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -218,11 +218,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-securitylake/src/runtimeConfig.browser.ts b/clients/client-securitylake/src/runtimeConfig.browser.ts index fb50ad2984d1..c7da54c3c288 100644 --- a/clients/client-securitylake/src/runtimeConfig.browser.ts +++ b/clients/client-securitylake/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SecurityLakeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-securitylake/src/runtimeConfig.ts b/clients/client-securitylake/src/runtimeConfig.ts index f6bd5af09b59..f89488de73a1 100644 --- a/clients/client-securitylake/src/runtimeConfig.ts +++ b/clients/client-securitylake/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SecurityLakeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-serverlessapplicationrepository/package.json b/clients/client-serverlessapplicationrepository/package.json index fe01c8029b9c..7e42f29457cd 100644 --- a/clients/client-serverlessapplicationrepository/package.json +++ b/clients/client-serverlessapplicationrepository/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-serverlessapplicationrepository/src/ServerlessApplicationRepositoryClient.ts b/clients/client-serverlessapplicationrepository/src/ServerlessApplicationRepositoryClient.ts index 1a28941ba598..edd32394bff6 100644 --- a/clients/client-serverlessapplicationrepository/src/ServerlessApplicationRepositoryClient.ts +++ b/clients/client-serverlessapplicationrepository/src/ServerlessApplicationRepositoryClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -143,11 +143,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-serverlessapplicationrepository/src/runtimeConfig.browser.ts b/clients/client-serverlessapplicationrepository/src/runtimeConfig.browser.ts index 1b2d73badf6e..c9e9b5545717 100644 --- a/clients/client-serverlessapplicationrepository/src/runtimeConfig.browser.ts +++ b/clients/client-serverlessapplicationrepository/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ServerlessApplicationRepositoryClientCo defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-serverlessapplicationrepository/src/runtimeConfig.ts b/clients/client-serverlessapplicationrepository/src/runtimeConfig.ts index 17c64fd93bd7..dbb3b3f919d2 100644 --- a/clients/client-serverlessapplicationrepository/src/runtimeConfig.ts +++ b/clients/client-serverlessapplicationrepository/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ServerlessApplicationRepositoryClientCo defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-service-catalog-appregistry/package.json b/clients/client-service-catalog-appregistry/package.json index 0d3e2c7ba3e8..c972385d601c 100644 --- a/clients/client-service-catalog-appregistry/package.json +++ b/clients/client-service-catalog-appregistry/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistryClient.ts b/clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistryClient.ts index 2510eec019e6..b91810d4cbe9 100644 --- a/clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistryClient.ts +++ b/clients/client-service-catalog-appregistry/src/ServiceCatalogAppRegistryClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -185,11 +185,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-service-catalog-appregistry/src/runtimeConfig.browser.ts b/clients/client-service-catalog-appregistry/src/runtimeConfig.browser.ts index 231042cdc426..613ad1495af9 100644 --- a/clients/client-service-catalog-appregistry/src/runtimeConfig.browser.ts +++ b/clients/client-service-catalog-appregistry/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ServiceCatalogAppRegistryClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-service-catalog-appregistry/src/runtimeConfig.ts b/clients/client-service-catalog-appregistry/src/runtimeConfig.ts index da7a9fa6b084..e5935bd74c02 100644 --- a/clients/client-service-catalog-appregistry/src/runtimeConfig.ts +++ b/clients/client-service-catalog-appregistry/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ServiceCatalogAppRegistryClientConfig) defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-service-catalog/package.json b/clients/client-service-catalog/package.json index dca082b725ce..d0892cb77bf3 100644 --- a/clients/client-service-catalog/package.json +++ b/clients/client-service-catalog/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-service-catalog/src/ServiceCatalogClient.ts b/clients/client-service-catalog/src/ServiceCatalogClient.ts index d2fb991db5df..3d9126389b59 100644 --- a/clients/client-service-catalog/src/ServiceCatalogClient.ts +++ b/clients/client-service-catalog/src/ServiceCatalogClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -542,11 +542,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-service-catalog/src/runtimeConfig.browser.ts b/clients/client-service-catalog/src/runtimeConfig.browser.ts index aa9cd97008e8..61bc117086bd 100644 --- a/clients/client-service-catalog/src/runtimeConfig.browser.ts +++ b/clients/client-service-catalog/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ServiceCatalogClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-service-catalog/src/runtimeConfig.ts b/clients/client-service-catalog/src/runtimeConfig.ts index b239ceb1db4b..4b582a5ec57c 100644 --- a/clients/client-service-catalog/src/runtimeConfig.ts +++ b/clients/client-service-catalog/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ServiceCatalogClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-service-quotas/package.json b/clients/client-service-quotas/package.json index cadd803ec3c1..fb96fa446f24 100644 --- a/clients/client-service-quotas/package.json +++ b/clients/client-service-quotas/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-service-quotas/src/ServiceQuotasClient.ts b/clients/client-service-quotas/src/ServiceQuotasClient.ts index 0e2eeeaad508..3bda710935f1 100644 --- a/clients/client-service-quotas/src/ServiceQuotasClient.ts +++ b/clients/client-service-quotas/src/ServiceQuotasClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -176,11 +176,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-service-quotas/src/runtimeConfig.browser.ts b/clients/client-service-quotas/src/runtimeConfig.browser.ts index dab7d36f60ea..21176b7a15df 100644 --- a/clients/client-service-quotas/src/runtimeConfig.browser.ts +++ b/clients/client-service-quotas/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ServiceQuotasClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-service-quotas/src/runtimeConfig.ts b/clients/client-service-quotas/src/runtimeConfig.ts index f2a2968a3f21..b71edee6f5c7 100644 --- a/clients/client-service-quotas/src/runtimeConfig.ts +++ b/clients/client-service-quotas/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ServiceQuotasClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-servicediscovery/package.json b/clients/client-servicediscovery/package.json index ee5fbba81b0c..ba4355ae8472 100644 --- a/clients/client-servicediscovery/package.json +++ b/clients/client-servicediscovery/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-servicediscovery/src/ServiceDiscoveryClient.ts b/clients/client-servicediscovery/src/ServiceDiscoveryClient.ts index 4203d1146356..47ae9a19f8fe 100644 --- a/clients/client-servicediscovery/src/ServiceDiscoveryClient.ts +++ b/clients/client-servicediscovery/src/ServiceDiscoveryClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -188,11 +188,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-servicediscovery/src/runtimeConfig.browser.ts b/clients/client-servicediscovery/src/runtimeConfig.browser.ts index 86b7b2e0378c..582e800ec156 100644 --- a/clients/client-servicediscovery/src/runtimeConfig.browser.ts +++ b/clients/client-servicediscovery/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ServiceDiscoveryClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-servicediscovery/src/runtimeConfig.ts b/clients/client-servicediscovery/src/runtimeConfig.ts index 6114f019adf5..42cdd6b69797 100644 --- a/clients/client-servicediscovery/src/runtimeConfig.ts +++ b/clients/client-servicediscovery/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ServiceDiscoveryClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ses/package.json b/clients/client-ses/package.json index 1a93c572853b..0db745011729 100644 --- a/clients/client-ses/package.json +++ b/clients/client-ses/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, diff --git a/clients/client-ses/src/SESClient.ts b/clients/client-ses/src/SESClient.ts index dc6b1cd6b69e..87c9be36d996 100644 --- a/clients/client-ses/src/SESClient.ts +++ b/clients/client-ses/src/SESClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -440,11 +440,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ses/src/runtimeConfig.browser.ts b/clients/client-ses/src/runtimeConfig.browser.ts index 93633615f206..7422d32e940d 100644 --- a/clients/client-ses/src/runtimeConfig.browser.ts +++ b/clients/client-ses/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SESClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ses/src/runtimeConfig.ts b/clients/client-ses/src/runtimeConfig.ts index d3bc9d85c75a..aa2ddd125fe9 100644 --- a/clients/client-ses/src/runtimeConfig.ts +++ b/clients/client-ses/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SESClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sesv2/package.json b/clients/client-sesv2/package.json index b12fef047b81..1703d559ab18 100644 --- a/clients/client-sesv2/package.json +++ b/clients/client-sesv2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sesv2/src/SESv2Client.ts b/clients/client-sesv2/src/SESv2Client.ts index 7f9a2db70b66..1baf10566593 100644 --- a/clients/client-sesv2/src/SESv2Client.ts +++ b/clients/client-sesv2/src/SESv2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -536,11 +536,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sesv2/src/runtimeConfig.browser.ts b/clients/client-sesv2/src/runtimeConfig.browser.ts index aff5bf02df9f..040f2ac26f9e 100644 --- a/clients/client-sesv2/src/runtimeConfig.browser.ts +++ b/clients/client-sesv2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SESv2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sesv2/src/runtimeConfig.ts b/clients/client-sesv2/src/runtimeConfig.ts index 628a77de0c3b..14bd664f8a53 100644 --- a/clients/client-sesv2/src/runtimeConfig.ts +++ b/clients/client-sesv2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SESv2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sfn/package.json b/clients/client-sfn/package.json index 7ed67f6fe85b..9c2c57adfdfd 100644 --- a/clients/client-sfn/package.json +++ b/clients/client-sfn/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-sfn/src/SFNClient.ts b/clients/client-sfn/src/SFNClient.ts index 48637b150449..0ca30b3e4129 100644 --- a/clients/client-sfn/src/SFNClient.ts +++ b/clients/client-sfn/src/SFNClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -221,11 +221,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sfn/src/runtimeConfig.browser.ts b/clients/client-sfn/src/runtimeConfig.browser.ts index 80157100e14c..f0941d400683 100644 --- a/clients/client-sfn/src/runtimeConfig.browser.ts +++ b/clients/client-sfn/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SFNClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sfn/src/runtimeConfig.ts b/clients/client-sfn/src/runtimeConfig.ts index a84384f121d8..d634255cf869 100644 --- a/clients/client-sfn/src/runtimeConfig.ts +++ b/clients/client-sfn/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SFNClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-shield/package.json b/clients/client-shield/package.json index 108ad5d230e3..f0999343ac33 100644 --- a/clients/client-shield/package.json +++ b/clients/client-shield/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-shield/src/ShieldClient.ts b/clients/client-shield/src/ShieldClient.ts index 276669fdf3fb..f89b085db555 100644 --- a/clients/client-shield/src/ShieldClient.ts +++ b/clients/client-shield/src/ShieldClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -254,11 +254,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-shield/src/runtimeConfig.browser.ts b/clients/client-shield/src/runtimeConfig.browser.ts index 174e932247d1..3ab967631209 100644 --- a/clients/client-shield/src/runtimeConfig.browser.ts +++ b/clients/client-shield/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: ShieldClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-shield/src/runtimeConfig.ts b/clients/client-shield/src/runtimeConfig.ts index 9733c1dad435..c6b345738cc8 100644 --- a/clients/client-shield/src/runtimeConfig.ts +++ b/clients/client-shield/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: ShieldClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-signer/package.json b/clients/client-signer/package.json index 26b3c7a557d3..b36205dd3324 100644 --- a/clients/client-signer/package.json +++ b/clients/client-signer/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-signer/src/SignerClient.ts b/clients/client-signer/src/SignerClient.ts index a05bce2e5e08..a424de01e274 100644 --- a/clients/client-signer/src/SignerClient.ts +++ b/clients/client-signer/src/SignerClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -161,11 +161,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-signer/src/runtimeConfig.browser.ts b/clients/client-signer/src/runtimeConfig.browser.ts index 97da24562ddc..411d63f9c622 100644 --- a/clients/client-signer/src/runtimeConfig.browser.ts +++ b/clients/client-signer/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SignerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-signer/src/runtimeConfig.ts b/clients/client-signer/src/runtimeConfig.ts index 1ddb3986c052..0d431c41cdc4 100644 --- a/clients/client-signer/src/runtimeConfig.ts +++ b/clients/client-signer/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SignerClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-simspaceweaver/package.json b/clients/client-simspaceweaver/package.json index e7bbc8cc3362..7922a87f8e08 100644 --- a/clients/client-simspaceweaver/package.json +++ b/clients/client-simspaceweaver/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-simspaceweaver/src/SimSpaceWeaverClient.ts b/clients/client-simspaceweaver/src/SimSpaceWeaverClient.ts index 9ba5e4b4ab64..aa4f6dc1fa92 100644 --- a/clients/client-simspaceweaver/src/SimSpaceWeaverClient.ts +++ b/clients/client-simspaceweaver/src/SimSpaceWeaverClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -128,11 +128,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-simspaceweaver/src/runtimeConfig.browser.ts b/clients/client-simspaceweaver/src/runtimeConfig.browser.ts index ed603ca5b587..34e3df402f77 100644 --- a/clients/client-simspaceweaver/src/runtimeConfig.browser.ts +++ b/clients/client-simspaceweaver/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SimSpaceWeaverClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-simspaceweaver/src/runtimeConfig.ts b/clients/client-simspaceweaver/src/runtimeConfig.ts index 500a543530d8..06de9d8c1d72 100644 --- a/clients/client-simspaceweaver/src/runtimeConfig.ts +++ b/clients/client-simspaceweaver/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SimSpaceWeaverClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sms/package.json b/clients/client-sms/package.json index 0cc0ccfbd5f9..dfab518f1eef 100644 --- a/clients/client-sms/package.json +++ b/clients/client-sms/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sms/src/SMSClient.ts b/clients/client-sms/src/SMSClient.ts index 2b9c68dc45d1..d2196b37fd17 100644 --- a/clients/client-sms/src/SMSClient.ts +++ b/clients/client-sms/src/SMSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -242,11 +242,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sms/src/runtimeConfig.browser.ts b/clients/client-sms/src/runtimeConfig.browser.ts index 7cb4c2f143d5..5b6f8cea56d3 100644 --- a/clients/client-sms/src/runtimeConfig.browser.ts +++ b/clients/client-sms/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SMSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sms/src/runtimeConfig.ts b/clients/client-sms/src/runtimeConfig.ts index 5ac8e1157b26..a4607d9b4df8 100644 --- a/clients/client-sms/src/runtimeConfig.ts +++ b/clients/client-sms/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SMSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-snow-device-management/package.json b/clients/client-snow-device-management/package.json index d0c61cf6de5f..5e4112b1b529 100644 --- a/clients/client-snow-device-management/package.json +++ b/clients/client-snow-device-management/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-snow-device-management/src/SnowDeviceManagementClient.ts b/clients/client-snow-device-management/src/SnowDeviceManagementClient.ts index ed1ffd048b11..28e76d4e1b07 100644 --- a/clients/client-snow-device-management/src/SnowDeviceManagementClient.ts +++ b/clients/client-snow-device-management/src/SnowDeviceManagementClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -125,11 +125,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-snow-device-management/src/runtimeConfig.browser.ts b/clients/client-snow-device-management/src/runtimeConfig.browser.ts index ecc38482ee78..075d7e36d085 100644 --- a/clients/client-snow-device-management/src/runtimeConfig.browser.ts +++ b/clients/client-snow-device-management/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SnowDeviceManagementClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-snow-device-management/src/runtimeConfig.ts b/clients/client-snow-device-management/src/runtimeConfig.ts index 9f8ea67bd351..88f99971002c 100644 --- a/clients/client-snow-device-management/src/runtimeConfig.ts +++ b/clients/client-snow-device-management/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SnowDeviceManagementClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-snowball/package.json b/clients/client-snowball/package.json index 2d3284827be3..7c0b60b630fe 100644 --- a/clients/client-snowball/package.json +++ b/clients/client-snowball/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-snowball/src/SnowballClient.ts b/clients/client-snowball/src/SnowballClient.ts index 20d88c2b5404..f403b0313ae1 100644 --- a/clients/client-snowball/src/SnowballClient.ts +++ b/clients/client-snowball/src/SnowballClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -185,11 +185,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-snowball/src/runtimeConfig.browser.ts b/clients/client-snowball/src/runtimeConfig.browser.ts index 015e41587ed8..23b0a0ea2213 100644 --- a/clients/client-snowball/src/runtimeConfig.browser.ts +++ b/clients/client-snowball/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SnowballClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-snowball/src/runtimeConfig.ts b/clients/client-snowball/src/runtimeConfig.ts index 0c153682685e..ef29698f7413 100644 --- a/clients/client-snowball/src/runtimeConfig.ts +++ b/clients/client-snowball/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SnowballClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sns/package.json b/clients/client-sns/package.json index 84333f631b76..85ccf45f37eb 100644 --- a/clients/client-sns/package.json +++ b/clients/client-sns/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" diff --git a/clients/client-sns/src/SNSClient.ts b/clients/client-sns/src/SNSClient.ts index 852983af32d1..d390671ceda2 100644 --- a/clients/client-sns/src/SNSClient.ts +++ b/clients/client-sns/src/SNSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -275,11 +275,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sns/src/runtimeConfig.browser.ts b/clients/client-sns/src/runtimeConfig.browser.ts index 74c72fb0d033..d913d1b9ff47 100644 --- a/clients/client-sns/src/runtimeConfig.browser.ts +++ b/clients/client-sns/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SNSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sns/src/runtimeConfig.ts b/clients/client-sns/src/runtimeConfig.ts index c3c87e8da07c..5d3729599a74 100644 --- a/clients/client-sns/src/runtimeConfig.ts +++ b/clients/client-sns/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SNSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sqs/package.json b/clients/client-sqs/package.json index 54d3a86abbb9..863b747cc6d9 100644 --- a/clients/client-sqs/package.json +++ b/clients/client-sqs/package.json @@ -33,31 +33,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/md5-js": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/md5-js": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sqs/src/SQSClient.ts b/clients/client-sqs/src/SQSClient.ts index 45bb07d69e09..f6e0a66263c1 100644 --- a/clients/client-sqs/src/SQSClient.ts +++ b/clients/client-sqs/src/SQSClient.ts @@ -28,7 +28,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -172,11 +172,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sqs/src/runtimeConfig.browser.ts b/clients/client-sqs/src/runtimeConfig.browser.ts index a683f1aa505e..7a6dad21b6ae 100644 --- a/clients/client-sqs/src/runtimeConfig.browser.ts +++ b/clients/client-sqs/src/runtimeConfig.browser.ts @@ -36,7 +36,7 @@ export const getRuntimeConfig = (config: SQSClientConfig) => { maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, md5: config?.md5 ?? Md5, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sqs/src/runtimeConfig.ts b/clients/client-sqs/src/runtimeConfig.ts index 46a37a744ce5..ec10ef46abd9 100644 --- a/clients/client-sqs/src/runtimeConfig.ts +++ b/clients/client-sqs/src/runtimeConfig.ts @@ -46,7 +46,7 @@ export const getRuntimeConfig = (config: SQSClientConfig) => { maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), md5: config?.md5 ?? Hash.bind(null, "md5"), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ssm-contacts/package.json b/clients/client-ssm-contacts/package.json index 0615ddca4f5e..b07bb2806411 100644 --- a/clients/client-ssm-contacts/package.json +++ b/clients/client-ssm-contacts/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-ssm-contacts/src/SSMContactsClient.ts b/clients/client-ssm-contacts/src/SSMContactsClient.ts index 6ee40d061159..a7f9c976c8f9 100644 --- a/clients/client-ssm-contacts/src/SSMContactsClient.ts +++ b/clients/client-ssm-contacts/src/SSMContactsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -236,11 +236,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ssm-contacts/src/runtimeConfig.browser.ts b/clients/client-ssm-contacts/src/runtimeConfig.browser.ts index ef93cd0636a8..01560cae5282 100644 --- a/clients/client-ssm-contacts/src/runtimeConfig.browser.ts +++ b/clients/client-ssm-contacts/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SSMContactsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ssm-contacts/src/runtimeConfig.ts b/clients/client-ssm-contacts/src/runtimeConfig.ts index 400bdc18a1ff..185b34c285fc 100644 --- a/clients/client-ssm-contacts/src/runtimeConfig.ts +++ b/clients/client-ssm-contacts/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SSMContactsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ssm-incidents/package.json b/clients/client-ssm-incidents/package.json index d6f304a7dcf2..05eadfff2e82 100644 --- a/clients/client-ssm-incidents/package.json +++ b/clients/client-ssm-incidents/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-ssm-incidents/src/SSMIncidentsClient.ts b/clients/client-ssm-incidents/src/SSMIncidentsClient.ts index d76846dc7778..a635ee4a0e78 100644 --- a/clients/client-ssm-incidents/src/SSMIncidentsClient.ts +++ b/clients/client-ssm-incidents/src/SSMIncidentsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -218,11 +218,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ssm-incidents/src/runtimeConfig.browser.ts b/clients/client-ssm-incidents/src/runtimeConfig.browser.ts index 5e1c463bdc2a..aecdc55328cd 100644 --- a/clients/client-ssm-incidents/src/runtimeConfig.browser.ts +++ b/clients/client-ssm-incidents/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SSMIncidentsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ssm-incidents/src/runtimeConfig.ts b/clients/client-ssm-incidents/src/runtimeConfig.ts index 3cbec82679d6..10c94df288c1 100644 --- a/clients/client-ssm-incidents/src/runtimeConfig.ts +++ b/clients/client-ssm-incidents/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SSMIncidentsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ssm-sap/package.json b/clients/client-ssm-sap/package.json index 7dcb8ea38504..e14790197360 100644 --- a/clients/client-ssm-sap/package.json +++ b/clients/client-ssm-sap/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-ssm-sap/src/SsmSapClient.ts b/clients/client-ssm-sap/src/SsmSapClient.ts index ce7e2a0e441b..398b4267610d 100644 --- a/clients/client-ssm-sap/src/SsmSapClient.ts +++ b/clients/client-ssm-sap/src/SsmSapClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -155,11 +155,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ssm-sap/src/runtimeConfig.browser.ts b/clients/client-ssm-sap/src/runtimeConfig.browser.ts index b7b365648c76..e45c7ffb5fa5 100644 --- a/clients/client-ssm-sap/src/runtimeConfig.browser.ts +++ b/clients/client-ssm-sap/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SsmSapClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ssm-sap/src/runtimeConfig.ts b/clients/client-ssm-sap/src/runtimeConfig.ts index ae27d22e567c..d8a765819623 100644 --- a/clients/client-ssm-sap/src/runtimeConfig.ts +++ b/clients/client-ssm-sap/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SsmSapClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-ssm/package.json b/clients/client-ssm/package.json index 9ae622552a10..6e978bc36399 100644 --- a/clients/client-ssm/package.json +++ b/clients/client-ssm/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/clients/client-ssm/src/SSMClient.ts b/clients/client-ssm/src/SSMClient.ts index 08b0a5c57279..73380777dc03 100644 --- a/clients/client-ssm/src/SSMClient.ts +++ b/clients/client-ssm/src/SSMClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -770,11 +770,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-ssm/src/runtimeConfig.browser.ts b/clients/client-ssm/src/runtimeConfig.browser.ts index fc39acc6e0d9..1a8c364359ce 100644 --- a/clients/client-ssm/src/runtimeConfig.browser.ts +++ b/clients/client-ssm/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SSMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-ssm/src/runtimeConfig.ts b/clients/client-ssm/src/runtimeConfig.ts index 79ce49cf7b80..5b4aa784cdfc 100644 --- a/clients/client-ssm/src/runtimeConfig.ts +++ b/clients/client-ssm/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SSMClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sso-admin/package.json b/clients/client-sso-admin/package.json index f23b9f3e2ac8..c12f3ec3c772 100644 --- a/clients/client-sso-admin/package.json +++ b/clients/client-sso-admin/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-sso-admin/src/SSOAdminClient.ts b/clients/client-sso-admin/src/SSOAdminClient.ts index dd9d03666630..59eca105a342 100644 --- a/clients/client-sso-admin/src/SSOAdminClient.ts +++ b/clients/client-sso-admin/src/SSOAdminClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -479,11 +479,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sso-admin/src/runtimeConfig.browser.ts b/clients/client-sso-admin/src/runtimeConfig.browser.ts index f6c092ecd553..698da7225216 100644 --- a/clients/client-sso-admin/src/runtimeConfig.browser.ts +++ b/clients/client-sso-admin/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SSOAdminClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sso-admin/src/runtimeConfig.ts b/clients/client-sso-admin/src/runtimeConfig.ts index acc092b81951..fd06a1b418fe 100644 --- a/clients/client-sso-admin/src/runtimeConfig.ts +++ b/clients/client-sso-admin/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SSOAdminClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sso-oidc/package.json b/clients/client-sso-oidc/package.json index ecdd2b32b9af..a353cd2e019c 100644 --- a/clients/client-sso-oidc/package.json +++ b/clients/client-sso-oidc/package.json @@ -31,30 +31,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sso-oidc/src/SSOOIDCClient.ts b/clients/client-sso-oidc/src/SSOOIDCClient.ts index 1b0832306fb5..d792291a7c4e 100644 --- a/clients/client-sso-oidc/src/SSOOIDCClient.ts +++ b/clients/client-sso-oidc/src/SSOOIDCClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -92,11 +92,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sso-oidc/src/runtimeConfig.browser.ts b/clients/client-sso-oidc/src/runtimeConfig.browser.ts index b39f27097b64..5f5eb524847e 100644 --- a/clients/client-sso-oidc/src/runtimeConfig.browser.ts +++ b/clients/client-sso-oidc/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SSOOIDCClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sso-oidc/src/runtimeConfig.ts b/clients/client-sso-oidc/src/runtimeConfig.ts index 756edf2a67d5..b1bdd4b6ef50 100644 --- a/clients/client-sso-oidc/src/runtimeConfig.ts +++ b/clients/client-sso-oidc/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SSOOIDCClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sso/package.json b/clients/client-sso/package.json index 2b37baadac14..3c185164f6cd 100644 --- a/clients/client-sso/package.json +++ b/clients/client-sso/package.json @@ -30,30 +30,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-sso/src/SSOClient.ts b/clients/client-sso/src/SSOClient.ts index 2027986e395a..7f56f5e5ac3b 100644 --- a/clients/client-sso/src/SSOClient.ts +++ b/clients/client-sso/src/SSOClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -88,11 +88,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sso/src/runtimeConfig.browser.ts b/clients/client-sso/src/runtimeConfig.browser.ts index b4c0eebed4a4..74b223824657 100644 --- a/clients/client-sso/src/runtimeConfig.browser.ts +++ b/clients/client-sso/src/runtimeConfig.browser.ts @@ -32,7 +32,7 @@ export const getRuntimeConfig = (config: SSOClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sso/src/runtimeConfig.ts b/clients/client-sso/src/runtimeConfig.ts index 408c850c18e6..dcf91468f8af 100644 --- a/clients/client-sso/src/runtimeConfig.ts +++ b/clients/client-sso/src/runtimeConfig.ts @@ -42,7 +42,7 @@ export const getRuntimeConfig = (config: SSOClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-storage-gateway/package.json b/clients/client-storage-gateway/package.json index 68e203656f6d..04814329f71e 100644 --- a/clients/client-storage-gateway/package.json +++ b/clients/client-storage-gateway/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-storage-gateway/src/StorageGatewayClient.ts b/clients/client-storage-gateway/src/StorageGatewayClient.ts index e7050a889487..17170bba8925 100644 --- a/clients/client-storage-gateway/src/StorageGatewayClient.ts +++ b/clients/client-storage-gateway/src/StorageGatewayClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -500,11 +500,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-storage-gateway/src/runtimeConfig.browser.ts b/clients/client-storage-gateway/src/runtimeConfig.browser.ts index dcee7a60e4d8..5ca935485a7d 100644 --- a/clients/client-storage-gateway/src/runtimeConfig.browser.ts +++ b/clients/client-storage-gateway/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: StorageGatewayClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-storage-gateway/src/runtimeConfig.ts b/clients/client-storage-gateway/src/runtimeConfig.ts index 6aba971fa846..2cbe4328bd8f 100644 --- a/clients/client-storage-gateway/src/runtimeConfig.ts +++ b/clients/client-storage-gateway/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: StorageGatewayClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sts/package.json b/clients/client-sts/package.json index 4aad24c7305b..c0f2d6ebc6eb 100644 --- a/clients/client-sts/package.json +++ b/clients/client-sts/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" diff --git a/clients/client-sts/src/STSClient.ts b/clients/client-sts/src/STSClient.ts index 9a1046a55681..57ea410803c6 100644 --- a/clients/client-sts/src/STSClient.ts +++ b/clients/client-sts/src/STSClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -107,11 +107,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-sts/src/runtimeConfig.browser.ts b/clients/client-sts/src/runtimeConfig.browser.ts index fd9bb843990b..52a842052e00 100644 --- a/clients/client-sts/src/runtimeConfig.browser.ts +++ b/clients/client-sts/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: STSClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-sts/src/runtimeConfig.ts b/clients/client-sts/src/runtimeConfig.ts index cd214de4d0f3..def26206cd3a 100644 --- a/clients/client-sts/src/runtimeConfig.ts +++ b/clients/client-sts/src/runtimeConfig.ts @@ -61,7 +61,7 @@ export const getRuntimeConfig = (config: STSClientConfig) => { ], maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-sts/test/defaultRoleAssumers.spec.ts b/clients/client-sts/test/defaultRoleAssumers.spec.ts index 51666a8f785f..2be61122a3c1 100644 --- a/clients/client-sts/test/defaultRoleAssumers.spec.ts +++ b/clients/client-sts/test/defaultRoleAssumers.spec.ts @@ -14,13 +14,22 @@ const mockHandle = jest.fn().mockResolvedValue({ body: Readable.from([""]), }), }); -jest.mock("@smithy/node-http-handler", () => ({ - NodeHttpHandler: jest.fn().mockImplementation(() => ({ - destroy: () => {}, - handle: mockHandle, - })), - streamCollector: jest.fn(), -})); +jest.mock("@smithy/node-http-handler", () => { + class MockNodeHttpHandler { + static create(instanceOrOptions?: any) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new MockNodeHttpHandler(); + } + destroy() {} + handle = mockHandle; + } + return { + NodeHttpHandler: MockNodeHttpHandler, + streamCollector: jest.fn(), + }; +}); const mockConstructorInput = jest.fn(); jest.mock("../src/STSClient", () => ({ diff --git a/clients/client-supplychain/package.json b/clients/client-supplychain/package.json index 3863923b9c25..810f694ee2eb 100644 --- a/clients/client-supplychain/package.json +++ b/clients/client-supplychain/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-supplychain/src/SupplyChainClient.ts b/clients/client-supplychain/src/SupplyChainClient.ts index 49e23c2fff2f..5f53d434da34 100644 --- a/clients/client-supplychain/src/SupplyChainClient.ts +++ b/clients/client-supplychain/src/SupplyChainClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -85,11 +85,11 @@ export type ServiceOutputTypes = CreateBillOfMaterialsImportJobCommandOutput | G /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-supplychain/src/runtimeConfig.browser.ts b/clients/client-supplychain/src/runtimeConfig.browser.ts index bc720276cff8..7a28baea55c3 100644 --- a/clients/client-supplychain/src/runtimeConfig.browser.ts +++ b/clients/client-supplychain/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SupplyChainClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-supplychain/src/runtimeConfig.ts b/clients/client-supplychain/src/runtimeConfig.ts index cfce61f0ca99..521e59daf6b8 100644 --- a/clients/client-supplychain/src/runtimeConfig.ts +++ b/clients/client-supplychain/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SupplyChainClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-support-app/package.json b/clients/client-support-app/package.json index 1e851a0f7384..d51ea8883442 100644 --- a/clients/client-support-app/package.json +++ b/clients/client-support-app/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-support-app/src/SupportAppClient.ts b/clients/client-support-app/src/SupportAppClient.ts index b2e1d314e6ca..4003bf10348a 100644 --- a/clients/client-support-app/src/SupportAppClient.ts +++ b/clients/client-support-app/src/SupportAppClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -128,11 +128,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-support-app/src/runtimeConfig.browser.ts b/clients/client-support-app/src/runtimeConfig.browser.ts index 779a76437132..76b0a94694bc 100644 --- a/clients/client-support-app/src/runtimeConfig.browser.ts +++ b/clients/client-support-app/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SupportAppClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-support-app/src/runtimeConfig.ts b/clients/client-support-app/src/runtimeConfig.ts index e621dc60b5be..7201417986a5 100644 --- a/clients/client-support-app/src/runtimeConfig.ts +++ b/clients/client-support-app/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SupportAppClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-support/package.json b/clients/client-support/package.json index 6498c3fae96d..aa86c01aa1f8 100644 --- a/clients/client-support/package.json +++ b/clients/client-support/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-support/src/SupportClient.ts b/clients/client-support/src/SupportClient.ts index c07657c31222..f8dd0292cff2 100644 --- a/clients/client-support/src/SupportClient.ts +++ b/clients/client-support/src/SupportClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -158,11 +158,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-support/src/runtimeConfig.browser.ts b/clients/client-support/src/runtimeConfig.browser.ts index 7df04bd404d2..fd3f8388f70f 100644 --- a/clients/client-support/src/runtimeConfig.browser.ts +++ b/clients/client-support/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SupportClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-support/src/runtimeConfig.ts b/clients/client-support/src/runtimeConfig.ts index d76de5f65931..961fa269e150 100644 --- a/clients/client-support/src/runtimeConfig.ts +++ b/clients/client-support/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SupportClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-swf/package.json b/clients/client-swf/package.json index 44544f9aa2c5..bfe9df0f8e6e 100644 --- a/clients/client-swf/package.json +++ b/clients/client-swf/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-swf/src/SWFClient.ts b/clients/client-swf/src/SWFClient.ts index ce1ff3adfcdf..fc5c0911aa8f 100644 --- a/clients/client-swf/src/SWFClient.ts +++ b/clients/client-swf/src/SWFClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -272,11 +272,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-swf/src/runtimeConfig.browser.ts b/clients/client-swf/src/runtimeConfig.browser.ts index 8b91602003f3..f13d7d59e351 100644 --- a/clients/client-swf/src/runtimeConfig.browser.ts +++ b/clients/client-swf/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SWFClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-swf/src/runtimeConfig.ts b/clients/client-swf/src/runtimeConfig.ts index bd79dac0b3a8..1a82b0516658 100644 --- a/clients/client-swf/src/runtimeConfig.ts +++ b/clients/client-swf/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SWFClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-synthetics/package.json b/clients/client-synthetics/package.json index 3f6bfc288e58..55ba852f2786 100644 --- a/clients/client-synthetics/package.json +++ b/clients/client-synthetics/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-synthetics/src/SyntheticsClient.ts b/clients/client-synthetics/src/SyntheticsClient.ts index 2851120f3ad9..4c394822a25b 100644 --- a/clients/client-synthetics/src/SyntheticsClient.ts +++ b/clients/client-synthetics/src/SyntheticsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -155,11 +155,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-synthetics/src/runtimeConfig.browser.ts b/clients/client-synthetics/src/runtimeConfig.browser.ts index 3c7d8cd08d84..f00a97ff92d6 100644 --- a/clients/client-synthetics/src/runtimeConfig.browser.ts +++ b/clients/client-synthetics/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: SyntheticsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-synthetics/src/runtimeConfig.ts b/clients/client-synthetics/src/runtimeConfig.ts index f68cb32bf6c9..b8ed49e3e09b 100644 --- a/clients/client-synthetics/src/runtimeConfig.ts +++ b/clients/client-synthetics/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: SyntheticsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-textract/package.json b/clients/client-textract/package.json index 0d5117dc8f67..5d4d2a9ce3de 100644 --- a/clients/client-textract/package.json +++ b/clients/client-textract/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-textract/src/TextractClient.ts b/clients/client-textract/src/TextractClient.ts index 51d534ddd5aa..1e9573297ced 100644 --- a/clients/client-textract/src/TextractClient.ts +++ b/clients/client-textract/src/TextractClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -185,11 +185,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-textract/src/runtimeConfig.browser.ts b/clients/client-textract/src/runtimeConfig.browser.ts index 9f70d25a9043..d01c76b655e7 100644 --- a/clients/client-textract/src/runtimeConfig.browser.ts +++ b/clients/client-textract/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: TextractClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-textract/src/runtimeConfig.ts b/clients/client-textract/src/runtimeConfig.ts index 6de627aa00f4..f9c36f8bcc6a 100644 --- a/clients/client-textract/src/runtimeConfig.ts +++ b/clients/client-textract/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: TextractClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-timestream-query/package.json b/clients/client-timestream-query/package.json index 507380099d5e..cc837115d6da 100644 --- a/clients/client-timestream-query/package.json +++ b/clients/client-timestream-query/package.json @@ -33,30 +33,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-timestream-query/src/TimestreamQueryClient.ts b/clients/client-timestream-query/src/TimestreamQueryClient.ts index 6cd1a07ac137..7218e4f9a892 100644 --- a/clients/client-timestream-query/src/TimestreamQueryClient.ts +++ b/clients/client-timestream-query/src/TimestreamQueryClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -146,11 +146,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-timestream-query/src/runtimeConfig.browser.ts b/clients/client-timestream-query/src/runtimeConfig.browser.ts index 2cb0928864fc..51429bc32d83 100644 --- a/clients/client-timestream-query/src/runtimeConfig.browser.ts +++ b/clients/client-timestream-query/src/runtimeConfig.browser.ts @@ -35,7 +35,7 @@ export const getRuntimeConfig = (config: TimestreamQueryClientConfig) => { endpointDiscoveryEnabledProvider: config?.endpointDiscoveryEnabledProvider ?? (() => Promise.resolve(undefined)), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-timestream-query/src/runtimeConfig.ts b/clients/client-timestream-query/src/runtimeConfig.ts index b586515d765d..8f8f4b3dac52 100644 --- a/clients/client-timestream-query/src/runtimeConfig.ts +++ b/clients/client-timestream-query/src/runtimeConfig.ts @@ -47,7 +47,7 @@ export const getRuntimeConfig = (config: TimestreamQueryClientConfig) => { config?.endpointDiscoveryEnabledProvider ?? loadNodeConfig(NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-timestream-write/package.json b/clients/client-timestream-write/package.json index 282e29814131..0632071abac6 100644 --- a/clients/client-timestream-write/package.json +++ b/clients/client-timestream-write/package.json @@ -33,30 +33,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-timestream-write/src/TimestreamWriteClient.ts b/clients/client-timestream-write/src/TimestreamWriteClient.ts index ad577b16ac42..be7402f427cb 100644 --- a/clients/client-timestream-write/src/TimestreamWriteClient.ts +++ b/clients/client-timestream-write/src/TimestreamWriteClient.ts @@ -27,7 +27,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -155,11 +155,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-timestream-write/src/runtimeConfig.browser.ts b/clients/client-timestream-write/src/runtimeConfig.browser.ts index fa188c2372b4..d452e668db7d 100644 --- a/clients/client-timestream-write/src/runtimeConfig.browser.ts +++ b/clients/client-timestream-write/src/runtimeConfig.browser.ts @@ -35,7 +35,7 @@ export const getRuntimeConfig = (config: TimestreamWriteClientConfig) => { endpointDiscoveryEnabledProvider: config?.endpointDiscoveryEnabledProvider ?? (() => Promise.resolve(undefined)), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-timestream-write/src/runtimeConfig.ts b/clients/client-timestream-write/src/runtimeConfig.ts index 3e205afb8c2b..eeb48afc6657 100644 --- a/clients/client-timestream-write/src/runtimeConfig.ts +++ b/clients/client-timestream-write/src/runtimeConfig.ts @@ -47,7 +47,7 @@ export const getRuntimeConfig = (config: TimestreamWriteClientConfig) => { config?.endpointDiscoveryEnabledProvider ?? loadNodeConfig(NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-tnb/package.json b/clients/client-tnb/package.json index a00229cfbab7..07c9e132634f 100644 --- a/clients/client-tnb/package.json +++ b/clients/client-tnb/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-tnb/src/TnbClient.ts b/clients/client-tnb/src/TnbClient.ts index ab7eaf4aa3e5..869c3392aa77 100644 --- a/clients/client-tnb/src/TnbClient.ts +++ b/clients/client-tnb/src/TnbClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -269,11 +269,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-tnb/src/runtimeConfig.browser.ts b/clients/client-tnb/src/runtimeConfig.browser.ts index d72a58aa82bf..4d68aa73c658 100644 --- a/clients/client-tnb/src/runtimeConfig.browser.ts +++ b/clients/client-tnb/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: TnbClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-tnb/src/runtimeConfig.ts b/clients/client-tnb/src/runtimeConfig.ts index 18923bc5e630..c1054531e23e 100644 --- a/clients/client-tnb/src/runtimeConfig.ts +++ b/clients/client-tnb/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: TnbClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-transcribe-streaming/package.json b/clients/client-transcribe-streaming/package.json index 7eaa62233091..640133e5c32a 100644 --- a/clients/client-transcribe-streaming/package.json +++ b/clients/client-transcribe-streaming/package.json @@ -38,32 +38,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/eventstream-serde-config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/eventstream-serde-config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-transcribe-streaming/src/TranscribeStreamingClient.ts b/clients/client-transcribe-streaming/src/TranscribeStreamingClient.ts index 497473ab61ca..e8d06e53757d 100644 --- a/clients/client-transcribe-streaming/src/TranscribeStreamingClient.ts +++ b/clients/client-transcribe-streaming/src/TranscribeStreamingClient.ts @@ -39,7 +39,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -106,11 +106,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-transcribe-streaming/src/runtimeConfig.browser.ts b/clients/client-transcribe-streaming/src/runtimeConfig.browser.ts index 84d0c3b86283..879dc726a9e8 100644 --- a/clients/client-transcribe-streaming/src/runtimeConfig.browser.ts +++ b/clients/client-transcribe-streaming/src/runtimeConfig.browser.ts @@ -4,7 +4,10 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; import { eventStreamPayloadHandler } from "@aws-sdk/middleware-sdk-transcribe-streaming"; -import { WebSocketFetchHandler as WebSocketRequestHandler } from "@aws-sdk/middleware-websocket"; +import { + WebSocketFetchHandlerOptions, + WebSocketFetchHandler as WebSocketRequestHandler, +} from "@aws-sdk/middleware-websocket"; import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-browser"; @@ -39,9 +42,13 @@ export const getRuntimeConfig = (config: TranscribeStreamingClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: - config?.requestHandler ?? - new WebSocketRequestHandler(defaultConfigProvider, new HttpRequestHandler(defaultConfigProvider)), + requestHandler: WebSocketRequestHandler.create( + (config?.requestHandler as + | WebSocketRequestHandler + | WebSocketFetchHandlerOptions + | (() => Promise)) ?? defaultConfigProvider, + HttpRequestHandler.create(defaultConfigProvider) + ), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-transcribe-streaming/src/runtimeConfig.ts b/clients/client-transcribe-streaming/src/runtimeConfig.ts index f2e7f9d1c877..73a51c58adfd 100644 --- a/clients/client-transcribe-streaming/src/runtimeConfig.ts +++ b/clients/client-transcribe-streaming/src/runtimeConfig.ts @@ -48,9 +48,9 @@ export const getRuntimeConfig = (config: TranscribeStreamingClientConfig) => { eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: - config?.requestHandler ?? - new RequestHandler(async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })), + requestHandler: RequestHandler.create( + config?.requestHandler ?? (async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true })) + ), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-transcribe/package.json b/clients/client-transcribe/package.json index c13350034201..9dd17da87778 100644 --- a/clients/client-transcribe/package.json +++ b/clients/client-transcribe/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-transcribe/src/TranscribeClient.ts b/clients/client-transcribe/src/TranscribeClient.ts index 2a7fe0169207..7733694c8859 100644 --- a/clients/client-transcribe/src/TranscribeClient.ts +++ b/clients/client-transcribe/src/TranscribeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -311,11 +311,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-transcribe/src/runtimeConfig.browser.ts b/clients/client-transcribe/src/runtimeConfig.browser.ts index ab5a6ae9fe32..d6af13c1af5e 100644 --- a/clients/client-transcribe/src/runtimeConfig.browser.ts +++ b/clients/client-transcribe/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: TranscribeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-transcribe/src/runtimeConfig.ts b/clients/client-transcribe/src/runtimeConfig.ts index 53f5e454df7b..a9186a60530e 100644 --- a/clients/client-transcribe/src/runtimeConfig.ts +++ b/clients/client-transcribe/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: TranscribeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-transfer/package.json b/clients/client-transfer/package.json index e8263e568040..832754241c18 100644 --- a/clients/client-transfer/package.json +++ b/clients/client-transfer/package.json @@ -32,32 +32,32 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", - "@smithy/util-waiter": "^2.1.1", + "@smithy/util-waiter": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-transfer/src/TransferClient.ts b/clients/client-transfer/src/TransferClient.ts index 92aabbecff13..16ebc50b9478 100644 --- a/clients/client-transfer/src/TransferClient.ts +++ b/clients/client-transfer/src/TransferClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -272,11 +272,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-transfer/src/runtimeConfig.browser.ts b/clients/client-transfer/src/runtimeConfig.browser.ts index 90d5f7c4f4ba..c3610c42da03 100644 --- a/clients/client-transfer/src/runtimeConfig.browser.ts +++ b/clients/client-transfer/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: TransferClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-transfer/src/runtimeConfig.ts b/clients/client-transfer/src/runtimeConfig.ts index 85edee140e17..94e61426c453 100644 --- a/clients/client-transfer/src/runtimeConfig.ts +++ b/clients/client-transfer/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: TransferClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-translate/package.json b/clients/client-translate/package.json index b0573f30319d..14b128962d50 100644 --- a/clients/client-translate/package.json +++ b/clients/client-translate/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-translate/src/TranslateClient.ts b/clients/client-translate/src/TranslateClient.ts index d34d6c46f58d..b2d6a2af0c05 100644 --- a/clients/client-translate/src/TranslateClient.ts +++ b/clients/client-translate/src/TranslateClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -149,11 +149,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-translate/src/runtimeConfig.browser.ts b/clients/client-translate/src/runtimeConfig.browser.ts index 563fe0eeeebc..28b402c71b46 100644 --- a/clients/client-translate/src/runtimeConfig.browser.ts +++ b/clients/client-translate/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: TranslateClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-translate/src/runtimeConfig.ts b/clients/client-translate/src/runtimeConfig.ts index e29bb0872371..d7d9b520684b 100644 --- a/clients/client-translate/src/runtimeConfig.ts +++ b/clients/client-translate/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: TranslateClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-trustedadvisor/package.json b/clients/client-trustedadvisor/package.json index 25042aeb0b59..b8f6083ece91 100644 --- a/clients/client-trustedadvisor/package.json +++ b/clients/client-trustedadvisor/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-trustedadvisor/src/TrustedAdvisorClient.ts b/clients/client-trustedadvisor/src/TrustedAdvisorClient.ts index b1abaec55784..e05b00e688af 100644 --- a/clients/client-trustedadvisor/src/TrustedAdvisorClient.ts +++ b/clients/client-trustedadvisor/src/TrustedAdvisorClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -131,11 +131,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-trustedadvisor/src/runtimeConfig.browser.ts b/clients/client-trustedadvisor/src/runtimeConfig.browser.ts index 6789370ca51f..47b3ea1a0d6f 100644 --- a/clients/client-trustedadvisor/src/runtimeConfig.browser.ts +++ b/clients/client-trustedadvisor/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: TrustedAdvisorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-trustedadvisor/src/runtimeConfig.ts b/clients/client-trustedadvisor/src/runtimeConfig.ts index d9bd27eddd11..63e63845c9aa 100644 --- a/clients/client-trustedadvisor/src/runtimeConfig.ts +++ b/clients/client-trustedadvisor/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: TrustedAdvisorClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-verifiedpermissions/package.json b/clients/client-verifiedpermissions/package.json index dfd7ea290a8b..2c7ac293d67f 100644 --- a/clients/client-verifiedpermissions/package.json +++ b/clients/client-verifiedpermissions/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-verifiedpermissions/src/VerifiedPermissionsClient.ts b/clients/client-verifiedpermissions/src/VerifiedPermissionsClient.ts index 6e39b0b67bcb..c5080aaff081 100644 --- a/clients/client-verifiedpermissions/src/VerifiedPermissionsClient.ts +++ b/clients/client-verifiedpermissions/src/VerifiedPermissionsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -179,11 +179,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-verifiedpermissions/src/runtimeConfig.browser.ts b/clients/client-verifiedpermissions/src/runtimeConfig.browser.ts index d281b218b881..8688f1305070 100644 --- a/clients/client-verifiedpermissions/src/runtimeConfig.browser.ts +++ b/clients/client-verifiedpermissions/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: VerifiedPermissionsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-verifiedpermissions/src/runtimeConfig.ts b/clients/client-verifiedpermissions/src/runtimeConfig.ts index d156f37a1e98..cb9f23459d4a 100644 --- a/clients/client-verifiedpermissions/src/runtimeConfig.ts +++ b/clients/client-verifiedpermissions/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: VerifiedPermissionsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-voice-id/package.json b/clients/client-voice-id/package.json index 2bab74fceb6d..429761042cf9 100644 --- a/clients/client-voice-id/package.json +++ b/clients/client-voice-id/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-voice-id/src/VoiceIDClient.ts b/clients/client-voice-id/src/VoiceIDClient.ts index 965e11af948e..b8a0b1b48db6 100644 --- a/clients/client-voice-id/src/VoiceIDClient.ts +++ b/clients/client-voice-id/src/VoiceIDClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -188,11 +188,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-voice-id/src/runtimeConfig.browser.ts b/clients/client-voice-id/src/runtimeConfig.browser.ts index 49280f535bda..2276cf787540 100644 --- a/clients/client-voice-id/src/runtimeConfig.browser.ts +++ b/clients/client-voice-id/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: VoiceIDClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-voice-id/src/runtimeConfig.ts b/clients/client-voice-id/src/runtimeConfig.ts index cdfd5b793a5c..7e8485a96ec9 100644 --- a/clients/client-voice-id/src/runtimeConfig.ts +++ b/clients/client-voice-id/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: VoiceIDClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-vpc-lattice/package.json b/clients/client-vpc-lattice/package.json index 0010d595f470..e2cfb72eb5fa 100644 --- a/clients/client-vpc-lattice/package.json +++ b/clients/client-vpc-lattice/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-vpc-lattice/src/VPCLatticeClient.ts b/clients/client-vpc-lattice/src/VPCLatticeClient.ts index d9abedef2a8c..a26faa0dc043 100644 --- a/clients/client-vpc-lattice/src/VPCLatticeClient.ts +++ b/clients/client-vpc-lattice/src/VPCLatticeClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -293,11 +293,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-vpc-lattice/src/runtimeConfig.browser.ts b/clients/client-vpc-lattice/src/runtimeConfig.browser.ts index d31bc0a36419..634cf7ddd863 100644 --- a/clients/client-vpc-lattice/src/runtimeConfig.browser.ts +++ b/clients/client-vpc-lattice/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: VPCLatticeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-vpc-lattice/src/runtimeConfig.ts b/clients/client-vpc-lattice/src/runtimeConfig.ts index 077c5e3891e2..15261dfda964 100644 --- a/clients/client-vpc-lattice/src/runtimeConfig.ts +++ b/clients/client-vpc-lattice/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: VPCLatticeClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-waf-regional/package.json b/clients/client-waf-regional/package.json index 986b46859e63..a63b201100f8 100644 --- a/clients/client-waf-regional/package.json +++ b/clients/client-waf-regional/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-waf-regional/src/WAFRegionalClient.ts b/clients/client-waf-regional/src/WAFRegionalClient.ts index 72359fcb58fc..b976c8172cb6 100644 --- a/clients/client-waf-regional/src/WAFRegionalClient.ts +++ b/clients/client-waf-regional/src/WAFRegionalClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -425,11 +425,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-waf-regional/src/runtimeConfig.browser.ts b/clients/client-waf-regional/src/runtimeConfig.browser.ts index 093b6748f941..36266e6bdbb8 100644 --- a/clients/client-waf-regional/src/runtimeConfig.browser.ts +++ b/clients/client-waf-regional/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WAFRegionalClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-waf-regional/src/runtimeConfig.ts b/clients/client-waf-regional/src/runtimeConfig.ts index 3c0eabdb39c5..2a2d2e0e49dc 100644 --- a/clients/client-waf-regional/src/runtimeConfig.ts +++ b/clients/client-waf-regional/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WAFRegionalClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-waf/package.json b/clients/client-waf/package.json index 392cca1cb288..c7b3a9412fd1 100644 --- a/clients/client-waf/package.json +++ b/clients/client-waf/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-waf/src/WAFClient.ts b/clients/client-waf/src/WAFClient.ts index 566a4ded838b..6f5fee821b98 100644 --- a/clients/client-waf/src/WAFClient.ts +++ b/clients/client-waf/src/WAFClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -407,11 +407,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-waf/src/runtimeConfig.browser.ts b/clients/client-waf/src/runtimeConfig.browser.ts index 15528a5a0aeb..c80ff8455fef 100644 --- a/clients/client-waf/src/runtimeConfig.browser.ts +++ b/clients/client-waf/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WAFClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-waf/src/runtimeConfig.ts b/clients/client-waf/src/runtimeConfig.ts index db9887c51258..849b64aef835 100644 --- a/clients/client-waf/src/runtimeConfig.ts +++ b/clients/client-waf/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WAFClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-wafv2/package.json b/clients/client-wafv2/package.json index 2ba655d4d9f6..b398498762a4 100644 --- a/clients/client-wafv2/package.json +++ b/clients/client-wafv2/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-wafv2/src/WAFV2Client.ts b/clients/client-wafv2/src/WAFV2Client.ts index 751f314c00db..396257cea014 100644 --- a/clients/client-wafv2/src/WAFV2Client.ts +++ b/clients/client-wafv2/src/WAFV2Client.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -320,11 +320,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-wafv2/src/runtimeConfig.browser.ts b/clients/client-wafv2/src/runtimeConfig.browser.ts index 4574b15c9b72..44f59661bb0d 100644 --- a/clients/client-wafv2/src/runtimeConfig.browser.ts +++ b/clients/client-wafv2/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WAFV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-wafv2/src/runtimeConfig.ts b/clients/client-wafv2/src/runtimeConfig.ts index 1d9037be457d..17dea3011cc8 100644 --- a/clients/client-wafv2/src/runtimeConfig.ts +++ b/clients/client-wafv2/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WAFV2ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-wellarchitected/package.json b/clients/client-wellarchitected/package.json index 80fe7deacaad..9ba6ba712d99 100644 --- a/clients/client-wellarchitected/package.json +++ b/clients/client-wellarchitected/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-wellarchitected/src/WellArchitectedClient.ts b/clients/client-wellarchitected/src/WellArchitectedClient.ts index b057d5afe9f8..18ea50fde74a 100644 --- a/clients/client-wellarchitected/src/WellArchitectedClient.ts +++ b/clients/client-wellarchitected/src/WellArchitectedClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -365,11 +365,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-wellarchitected/src/runtimeConfig.browser.ts b/clients/client-wellarchitected/src/runtimeConfig.browser.ts index 2ce88a99267c..41ef14185af5 100644 --- a/clients/client-wellarchitected/src/runtimeConfig.browser.ts +++ b/clients/client-wellarchitected/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WellArchitectedClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-wellarchitected/src/runtimeConfig.ts b/clients/client-wellarchitected/src/runtimeConfig.ts index 5fcdd3b7d4b6..ea6af40f0bb6 100644 --- a/clients/client-wellarchitected/src/runtimeConfig.ts +++ b/clients/client-wellarchitected/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WellArchitectedClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-wisdom/package.json b/clients/client-wisdom/package.json index f1f5ae4e09e0..99a48cf82866 100644 --- a/clients/client-wisdom/package.json +++ b/clients/client-wisdom/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-wisdom/src/WisdomClient.ts b/clients/client-wisdom/src/WisdomClient.ts index 3aabb8c82ad8..50c2ba6ba9f1 100644 --- a/clients/client-wisdom/src/WisdomClient.ts +++ b/clients/client-wisdom/src/WisdomClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -242,11 +242,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-wisdom/src/runtimeConfig.browser.ts b/clients/client-wisdom/src/runtimeConfig.browser.ts index 4fd259676cf3..bedb2644811c 100644 --- a/clients/client-wisdom/src/runtimeConfig.browser.ts +++ b/clients/client-wisdom/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WisdomClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-wisdom/src/runtimeConfig.ts b/clients/client-wisdom/src/runtimeConfig.ts index 2bd15fb86be2..17425aff120b 100644 --- a/clients/client-wisdom/src/runtimeConfig.ts +++ b/clients/client-wisdom/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WisdomClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-workdocs/package.json b/clients/client-workdocs/package.json index 39aa993896ae..e18bed8c1dfc 100644 --- a/clients/client-workdocs/package.json +++ b/clients/client-workdocs/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-workdocs/src/WorkDocsClient.ts b/clients/client-workdocs/src/WorkDocsClient.ts index 70c0fe252f2b..25482555c7ba 100644 --- a/clients/client-workdocs/src/WorkDocsClient.ts +++ b/clients/client-workdocs/src/WorkDocsClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -263,11 +263,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-workdocs/src/runtimeConfig.browser.ts b/clients/client-workdocs/src/runtimeConfig.browser.ts index 03adf44cb83e..56b35c60e116 100644 --- a/clients/client-workdocs/src/runtimeConfig.browser.ts +++ b/clients/client-workdocs/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WorkDocsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-workdocs/src/runtimeConfig.ts b/clients/client-workdocs/src/runtimeConfig.ts index 438e1a69ef1f..6be7147c7f59 100644 --- a/clients/client-workdocs/src/runtimeConfig.ts +++ b/clients/client-workdocs/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WorkDocsClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-worklink/package.json b/clients/client-worklink/package.json index 4014a0ff146f..1df9dbc11170 100644 --- a/clients/client-worklink/package.json +++ b/clients/client-worklink/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-worklink/src/WorkLinkClient.ts b/clients/client-worklink/src/WorkLinkClient.ts index f526e28592b6..e44eb85b168d 100644 --- a/clients/client-worklink/src/WorkLinkClient.ts +++ b/clients/client-worklink/src/WorkLinkClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -236,11 +236,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-worklink/src/runtimeConfig.browser.ts b/clients/client-worklink/src/runtimeConfig.browser.ts index 5c7486d9b8fc..ee0154094d48 100644 --- a/clients/client-worklink/src/runtimeConfig.browser.ts +++ b/clients/client-worklink/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WorkLinkClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-worklink/src/runtimeConfig.ts b/clients/client-worklink/src/runtimeConfig.ts index d77933ce1a01..9b11c6a03813 100644 --- a/clients/client-worklink/src/runtimeConfig.ts +++ b/clients/client-worklink/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WorkLinkClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-workmail/package.json b/clients/client-workmail/package.json index db644b175919..7c2c34ebc004 100644 --- a/clients/client-workmail/package.json +++ b/clients/client-workmail/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-workmail/src/WorkMailClient.ts b/clients/client-workmail/src/WorkMailClient.ts index 1119bbf05e0c..ba6aed6ed1a0 100644 --- a/clients/client-workmail/src/WorkMailClient.ts +++ b/clients/client-workmail/src/WorkMailClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -482,11 +482,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-workmail/src/runtimeConfig.browser.ts b/clients/client-workmail/src/runtimeConfig.browser.ts index 464a9b33d2a9..3c58d13e0267 100644 --- a/clients/client-workmail/src/runtimeConfig.browser.ts +++ b/clients/client-workmail/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WorkMailClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-workmail/src/runtimeConfig.ts b/clients/client-workmail/src/runtimeConfig.ts index a07242e2c106..43713ac6617b 100644 --- a/clients/client-workmail/src/runtimeConfig.ts +++ b/clients/client-workmail/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WorkMailClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-workmailmessageflow/package.json b/clients/client-workmailmessageflow/package.json index f8fef2113117..d28e63862bf2 100644 --- a/clients/client-workmailmessageflow/package.json +++ b/clients/client-workmailmessageflow/package.json @@ -32,31 +32,31 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-workmailmessageflow/src/WorkMailMessageFlowClient.ts b/clients/client-workmailmessageflow/src/WorkMailMessageFlowClient.ts index e09e596e1b1f..7e36eef4510c 100644 --- a/clients/client-workmailmessageflow/src/WorkMailMessageFlowClient.ts +++ b/clients/client-workmailmessageflow/src/WorkMailMessageFlowClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -86,11 +86,11 @@ export type ServiceOutputTypes = GetRawMessageContentCommandOutput | PutRawMessa /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-workmailmessageflow/src/runtimeConfig.browser.ts b/clients/client-workmailmessageflow/src/runtimeConfig.browser.ts index 79e4977264eb..b33b700abc75 100644 --- a/clients/client-workmailmessageflow/src/runtimeConfig.browser.ts +++ b/clients/client-workmailmessageflow/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WorkMailMessageFlowClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-workmailmessageflow/src/runtimeConfig.ts b/clients/client-workmailmessageflow/src/runtimeConfig.ts index 46ddec8bf740..475de6fc001d 100644 --- a/clients/client-workmailmessageflow/src/runtimeConfig.ts +++ b/clients/client-workmailmessageflow/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WorkMailMessageFlowClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-workspaces-thin-client/package.json b/clients/client-workspaces-thin-client/package.json index 3f4af84fd2b4..8d81ac11c24a 100644 --- a/clients/client-workspaces-thin-client/package.json +++ b/clients/client-workspaces-thin-client/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-workspaces-thin-client/src/WorkSpacesThinClientClient.ts b/clients/client-workspaces-thin-client/src/WorkSpacesThinClientClient.ts index bb8d337b2f3f..73a6e5587503 100644 --- a/clients/client-workspaces-thin-client/src/WorkSpacesThinClientClient.ts +++ b/clients/client-workspaces-thin-client/src/WorkSpacesThinClientClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -128,11 +128,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-workspaces-thin-client/src/runtimeConfig.browser.ts b/clients/client-workspaces-thin-client/src/runtimeConfig.browser.ts index 9026d4839c3c..b9f96e858dbb 100644 --- a/clients/client-workspaces-thin-client/src/runtimeConfig.browser.ts +++ b/clients/client-workspaces-thin-client/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WorkSpacesThinClientClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-workspaces-thin-client/src/runtimeConfig.ts b/clients/client-workspaces-thin-client/src/runtimeConfig.ts index 62554c4b1d9f..a9773e764dbe 100644 --- a/clients/client-workspaces-thin-client/src/runtimeConfig.ts +++ b/clients/client-workspaces-thin-client/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WorkSpacesThinClientClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-workspaces-web/package.json b/clients/client-workspaces-web/package.json index af2fac5c8a24..36b2340be1fc 100644 --- a/clients/client-workspaces-web/package.json +++ b/clients/client-workspaces-web/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/clients/client-workspaces-web/src/WorkSpacesWebClient.ts b/clients/client-workspaces-web/src/WorkSpacesWebClient.ts index 4c01061c4ff8..cdc39d878c14 100644 --- a/clients/client-workspaces-web/src/WorkSpacesWebClient.ts +++ b/clients/client-workspaces-web/src/WorkSpacesWebClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -368,11 +368,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-workspaces-web/src/runtimeConfig.browser.ts b/clients/client-workspaces-web/src/runtimeConfig.browser.ts index 3d6b4a20f73f..3b637f103e36 100644 --- a/clients/client-workspaces-web/src/runtimeConfig.browser.ts +++ b/clients/client-workspaces-web/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WorkSpacesWebClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-workspaces-web/src/runtimeConfig.ts b/clients/client-workspaces-web/src/runtimeConfig.ts index e1f95b143f2f..0621769d2f6f 100644 --- a/clients/client-workspaces-web/src/runtimeConfig.ts +++ b/clients/client-workspaces-web/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WorkSpacesWebClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-workspaces/package.json b/clients/client-workspaces/package.json index 6ef3ec7c1971..0b0367545661 100644 --- a/clients/client-workspaces/package.json +++ b/clients/client-workspaces/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-workspaces/src/WorkSpacesClient.ts b/clients/client-workspaces/src/WorkSpacesClient.ts index c46f83709bc3..e19e39d5fe88 100644 --- a/clients/client-workspaces/src/WorkSpacesClient.ts +++ b/clients/client-workspaces/src/WorkSpacesClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -455,11 +455,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-workspaces/src/runtimeConfig.browser.ts b/clients/client-workspaces/src/runtimeConfig.browser.ts index 654591afd66d..7731e722a5e5 100644 --- a/clients/client-workspaces/src/runtimeConfig.browser.ts +++ b/clients/client-workspaces/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WorkSpacesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-workspaces/src/runtimeConfig.ts b/clients/client-workspaces/src/runtimeConfig.ts index 8c3ea4e9137b..1d44f648a3c5 100644 --- a/clients/client-workspaces/src/runtimeConfig.ts +++ b/clients/client-workspaces/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: WorkSpacesClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/clients/client-xray/package.json b/clients/client-xray/package.json index 22f469c3dc64..1411e4c88bd8 100644 --- a/clients/client-xray/package.json +++ b/clients/client-xray/package.json @@ -32,30 +32,30 @@ "@aws-sdk/util-endpoints": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-endpoints": "^1.1.2", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/clients/client-xray/src/XRayClient.ts b/clients/client-xray/src/XRayClient.ts index d51d848e3cce..01f91739f2d5 100644 --- a/clients/client-xray/src/XRayClient.ts +++ b/clients/client-xray/src/XRayClient.ts @@ -22,7 +22,7 @@ import { import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -197,11 +197,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/clients/client-xray/src/runtimeConfig.browser.ts b/clients/client-xray/src/runtimeConfig.browser.ts index 4df55519c9b2..2abb7c21d259 100644 --- a/clients/client-xray/src/runtimeConfig.browser.ts +++ b/clients/client-xray/src/runtimeConfig.browser.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: XRayClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/clients/client-xray/src/runtimeConfig.ts b/clients/client-xray/src/runtimeConfig.ts index 0fc4aea77833..4c45f374226e 100644 --- a/clients/client-xray/src/runtimeConfig.ts +++ b/clients/client-xray/src/runtimeConfig.ts @@ -44,7 +44,7 @@ export const getRuntimeConfig = (config: XRayClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddHttp2Dependency.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddHttp2Dependency.java index e5296552b81a..04f37549aa98 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddHttp2Dependency.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddHttp2Dependency.java @@ -49,7 +49,7 @@ public Map> getRuntimeConfigWriters( writer.addDependency(TypeScriptDependency.AWS_SDK_NODE_HTTP_HANDLER); writer.addImport("NodeHttp2Handler", "RequestHandler", TypeScriptDependency.AWS_SDK_NODE_HTTP_HANDLER); - writer.openBlock("new RequestHandler(async () => ({", "}))", () -> { + writer.openBlock("RequestHandler.create(config?.requestHandler ?? (async () => ({", "})))", () -> { writer.write("...await defaultConfigProvider(),"); // TODO: remove this when root cause of #3809 is found writer.write("disableConcurrentStreams: true"); diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddWebsocketPlugin.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddWebsocketPlugin.java index 48137214c428..7a371e357374 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddWebsocketPlugin.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddWebsocketPlugin.java @@ -92,11 +92,30 @@ public Map> getRuntimeConfigWriters( writer.addImport("FetchHttpHandler", "HttpRequestHandler", TypeScriptDependency.AWS_SDK_FETCH_HTTP_HANDLER); writer.addDependency(TypeScriptDependency.AWS_SDK_FETCH_HTTP_HANDLER); - writer.addImport("WebSocketFetchHandler", "WebSocketRequestHandler", - AwsDependency.MIDDLEWARE_WEBSOCKET); + writer + .addImport( + "WebSocketFetchHandler", + "WebSocketRequestHandler", + AwsDependency.MIDDLEWARE_WEBSOCKET + ) + .addImport( + "WebSocketFetchHandlerOptions", + null, + AwsDependency.MIDDLEWARE_WEBSOCKET + ); writer.addDependency(AwsDependency.MIDDLEWARE_WEBSOCKET); - writer.write("new WebSocketRequestHandler(defaultConfigProvider, " - + "new HttpRequestHandler(defaultConfigProvider))"); + writer.write( + """ + WebSocketRequestHandler.create( + config?.requestHandler as + WebSocketRequestHandler | + WebSocketFetchHandlerOptions | + (() => Promise) + ?? defaultConfigProvider, + HttpRequestHandler.create(defaultConfigProvider) + ) + """ + ); }); default: return Collections.emptyMap(); diff --git a/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/sts-client-defaultRoleAssumers.spec.ts b/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/sts-client-defaultRoleAssumers.spec.ts index ed94b9892bf6..072f80a3c4ce 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/sts-client-defaultRoleAssumers.spec.ts +++ b/codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/sts-client-defaultRoleAssumers.spec.ts @@ -12,13 +12,22 @@ const mockHandle = jest.fn().mockResolvedValue({ body: Readable.from([""]), }), }); -jest.mock("@smithy/node-http-handler", () => ({ - NodeHttpHandler: jest.fn().mockImplementation(() => ({ - destroy: () => {}, - handle: mockHandle, - })), - streamCollector: jest.fn(), -})); +jest.mock("@smithy/node-http-handler", () => { + class MockNodeHttpHandler { + static create(instanceOrOptions?: any) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new MockNodeHttpHandler(); + } + destroy() {} + handle = mockHandle; + } + return { + NodeHttpHandler: MockNodeHttpHandler, + streamCollector: jest.fn(), + }; +}); const mockConstructorInput = jest.fn(); jest.mock("../src/STSClient", () => ({ diff --git a/lib/lib-dynamodb/package.json b/lib/lib-dynamodb/package.json index d7a4f8c36703..3bfa8c1e4188 100644 --- a/lib/lib-dynamodb/package.json +++ b/lib/lib-dynamodb/package.json @@ -27,8 +27,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/util-dynamodb": "*", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "peerDependencies": { diff --git a/lib/lib-storage/package.json b/lib/lib-storage/package.json index 541b2ac82fa7..04aff5c8ff0a 100644 --- a/lib/lib-storage/package.json +++ b/lib/lib-storage/package.json @@ -26,8 +26,8 @@ "license": "Apache-2.0", "dependencies": { "@smithy/abort-controller": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/smithy-client": "^2.3.1", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/smithy-client": "^2.4.0", "buffer": "5.6.0", "events": "3.3.0", "stream-browserify": "3.0.0", @@ -38,7 +38,7 @@ }, "devDependencies": { "@aws-sdk/client-s3": "*", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "@tsconfig/recommended": "1.0.1", "@types/node": "^14.14.31", "concurrently": "7.0.0", diff --git a/packages/body-checksum-browser/package.json b/packages/body-checksum-browser/package.json index b7722b2b6f19..37d18c6b00d8 100644 --- a/packages/body-checksum-browser/package.json +++ b/packages/body-checksum-browser/package.json @@ -23,8 +23,8 @@ "@aws-sdk/sha256-tree-hash": "*", "@aws-sdk/types": "*", "@smithy/chunked-blob-reader": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "@smithy/util-hex-encoding": "^2.1.1", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" diff --git a/packages/body-checksum-node/package.json b/packages/body-checksum-node/package.json index 8c657c6162fc..036747749afc 100644 --- a/packages/body-checksum-node/package.json +++ b/packages/body-checksum-node/package.json @@ -24,8 +24,8 @@ "@aws-sdk/sha256-tree-hash": "*", "@aws-sdk/types": "*", "@smithy/is-array-buffer": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "@smithy/util-hex-encoding": "^2.1.1", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" diff --git a/packages/cloudfront-signer/package.json b/packages/cloudfront-signer/package.json index 280d4b0e2460..51fc572dca53 100644 --- a/packages/cloudfront-signer/package.json +++ b/packages/cloudfront-signer/package.json @@ -21,7 +21,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@smithy/url-parser": "^2.1.1", + "@smithy/url-parser": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/core/integ/request-handlers/request-handlers.integ.spec.ts b/packages/core/integ/request-handlers/request-handlers.integ.spec.ts new file mode 100644 index 000000000000..3c5f4b24ec9c --- /dev/null +++ b/packages/core/integ/request-handlers/request-handlers.integ.spec.ts @@ -0,0 +1,158 @@ +import { Kinesis } from "@aws-sdk/client-kinesis"; +import { S3 } from "@aws-sdk/client-s3"; +import { TranscribeStreaming } from "@aws-sdk/client-transcribe-streaming"; +import { WebSocketFetchHandler } from "@aws-sdk/middleware-websocket"; +import { XhrHttpHandler } from "@aws-sdk/xhr-http-handler"; +import { FetchHttpHandler } from "@smithy/fetch-http-handler"; +import { NodeHttp2Handler, NodeHttpHandler } from "@smithy/node-http-handler"; +import { Agent } from "https"; + +describe("request handler initialization", () => { + describe("http", () => { + it("should init with instances", async () => { + let instance: NodeHttpHandler; + let agentInstance: Agent; + const client = new S3({ + requestHandler: (instance = new NodeHttpHandler({ + requestTimeout: 2_000, + httpsAgent: (agentInstance = new Agent({ maxSockets: 25 })), + })), + }); + expect(client.config.requestHandler).toBe(instance); + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.httpsAgent).toBe(agentInstance); + expect((instance as any).config.requestTimeout).toEqual(2_000); + expect(agentInstance.maxSockets).toEqual(25); + }); + it("should init with Agent pass-through", async () => { + let instance: NodeHttpHandler; + const client = new S3({ + requestHandler: (instance = new NodeHttpHandler({ + requestTimeout: 2_000, + httpsAgent: { maxSockets: 25 }, + })), + }); + expect(client.config.requestHandler).toBe(instance); + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.requestTimeout).toEqual(2_000); + expect((instance as any).config.httpsAgent.maxSockets).toEqual(25); + }); + it("should init with ctor pass-through with Agent instance", async () => { + let agentInstance: Agent; + const client = new S3({ + requestHandler: { + requestTimeout: 2_000, + httpsAgent: (agentInstance = new Agent({ maxSockets: 25 })), + }, + }); + expect(client.config.requestHandler).toBeInstanceOf(NodeHttpHandler); + const instance = client.config.requestHandler; + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.httpsAgent).toBe(agentInstance); + expect((instance as any).config.requestTimeout).toEqual(2_000); + expect(agentInstance.maxSockets).toEqual(25); + }); + it("should init with ctor and Agent pass-through", async () => { + const client = new S3({ + requestHandler: { + requestTimeout: 2_000, + httpsAgent: { + maxSockets: 25, + }, + }, + }); + expect(client.config.requestHandler).toBeInstanceOf(NodeHttpHandler); + const instance = client.config.requestHandler; + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.httpsAgent).toBeInstanceOf(Agent); + const agentInstance = (instance as any).config.httpsAgent; + expect((instance as any).config.requestTimeout).toEqual(2_000); + expect(agentInstance.maxSockets).toEqual(25); + }); + }); + + describe("http2", () => { + it("should init with instances", async () => { + let instance: NodeHttp2Handler; + const client = new Kinesis({ + requestHandler: (instance = new NodeHttp2Handler({ + requestTimeout: 2_000, + })), + }); + expect(client.config.requestHandler).toBe(instance); + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.requestTimeout).toEqual(2_000); + }); + it("should init with ctor pass-through", async () => { + const client = new Kinesis({ + requestHandler: { + requestTimeout: 2_000, + }, + }); + expect(client.config.requestHandler).toBeInstanceOf(NodeHttp2Handler); + const instance = client.config.requestHandler; + (instance as any).config = await (instance as any).configProvider; + expect((instance as any).config.requestTimeout).toEqual(2_000); + }); + }); + + describe("fetch", () => { + it("should init with instances", async () => { + let instance: FetchHttpHandler; + const handler = FetchHttpHandler.create((instance = new FetchHttpHandler({ requestTimeout: 2_000 }))); + expect(handler).toBe(instance); + expect((instance as any).config.requestTimeout).toEqual(2_000); + }); + it("should init with ctor pass-through", async () => { + const handler = FetchHttpHandler.create({ requestTimeout: 2_000 }); + expect(handler).toBeInstanceOf(FetchHttpHandler); + expect((handler as any).config.requestTimeout).toEqual(2_000); + }); + }); + + describe("websocket", () => { + it("should init with instances", async () => { + let instance: WebSocketFetchHandler; + const handler = WebSocketFetchHandler.create( + (instance = new WebSocketFetchHandler({ connectionTimeout: 2_000 })) + ); + const client = new TranscribeStreaming({ + requestHandler: handler, + }); + expect(client.config.requestHandler).toBe(instance); + expect(handler).toBe(instance); + expect((await (handler as any).configPromise).connectionTimeout).toEqual(2_000); + }); + it("should init with ctor pass-through", async () => { + const handler = WebSocketFetchHandler.create({ connectionTimeout: 2_000 }); + const client = new TranscribeStreaming({ + requestHandler: handler, + }); + expect(client.config.requestHandler).toBe(handler); + expect(handler).toBeInstanceOf(WebSocketFetchHandler); + expect((await (handler as any).configPromise).connectionTimeout).toEqual(2_000); + }); + }); + + describe("xhr", () => { + it("should init with instances", async () => { + let instance: XhrHttpHandler; + const handler = XhrHttpHandler.create((instance = new XhrHttpHandler({ requestTimeout: 2_000 }))); + const client = new S3({ + requestHandler: instance, + }); + expect(client.config.requestHandler).toBe(handler); + expect(handler).toBe(instance); + expect((handler as any).config.requestTimeout).toEqual(2_000); + }); + it("should init with ctor pass-through", async () => { + const handler = XhrHttpHandler.create({ requestTimeout: 2_000 }); + const client = new S3({ + requestHandler: handler, + }); + expect(client.config.requestHandler).toBe(handler); + expect(handler).toBeInstanceOf(XhrHttpHandler); + expect((handler as any).config.requestTimeout).toEqual(2_000); + }); + }); +}); diff --git a/packages/core/jest.config.integ.js b/packages/core/jest.config.integ.js new file mode 100644 index 000000000000..d09aba7398c7 --- /dev/null +++ b/packages/core/jest.config.integ.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.integ.spec.ts"], +}; diff --git a/packages/core/package.json b/packages/core/package.json index 32d0f51d1065..e49fd3c67df6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -12,7 +12,8 @@ "lint": "node ./scripts/lint.js", "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", "extract:docs": "api-extractor run --local", - "test": "jest" + "test": "jest", + "test:integration": "jest -c jest.config.integ.js" }, "main": "./dist-cjs/index.js", "module": "./dist-es/index.js", @@ -24,11 +25,11 @@ }, "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^1.3.2", - "@smithy/protocol-http": "^3.1.1", + "@smithy/core": "^1.3.3", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/credential-provider-cognito-identity/package.json b/packages/credential-provider-cognito-identity/package.json index 4ddf1424f285..e47c88fa87a0 100644 --- a/packages/credential-provider-cognito-identity/package.json +++ b/packages/credential-provider-cognito-identity/package.json @@ -24,7 +24,7 @@ "@aws-sdk/client-cognito-identity": "*", "@aws-sdk/types": "*", "@smithy/property-provider": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/credential-provider-env/package.json b/packages/credential-provider-env/package.json index f8c1c1f68d3d..bc8b340ac9c4 100644 --- a/packages/credential-provider-env/package.json +++ b/packages/credential-provider-env/package.json @@ -26,7 +26,7 @@ "dependencies": { "@aws-sdk/types": "*", "@smithy/property-provider": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/credential-provider-http/package.json b/packages/credential-provider-http/package.json index 69ed5680f13a..14d888cf98bf 100644 --- a/packages/credential-provider-http/package.json +++ b/packages/credential-provider-http/package.json @@ -27,13 +27,13 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/node-http-handler": "^2.3.1", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/node-http-handler": "^2.4.0", "@smithy/property-provider": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/util-stream": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/credential-provider-ini/package.json b/packages/credential-provider-ini/package.json index e2323d1bb74f..a98f3ac9b02f 100644 --- a/packages/credential-provider-ini/package.json +++ b/packages/credential-provider-ini/package.json @@ -33,7 +33,7 @@ "@smithy/credential-provider-imds": "^2.2.1", "@smithy/property-provider": "^2.1.1", "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/credential-provider-node/package.json b/packages/credential-provider-node/package.json index 7d42fd29bc7d..774ca2a22e51 100644 --- a/packages/credential-provider-node/package.json +++ b/packages/credential-provider-node/package.json @@ -38,7 +38,7 @@ "@smithy/credential-provider-imds": "^2.2.1", "@smithy/property-provider": "^2.1.1", "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/credential-provider-node/src/credential-provider-node.integ.spec.ts b/packages/credential-provider-node/src/credential-provider-node.integ.spec.ts index 27669656ac28..650a5f0421b1 100644 --- a/packages/credential-provider-node/src/credential-provider-node.integ.spec.ts +++ b/packages/credential-provider-node/src/credential-provider-node.integ.spec.ts @@ -108,35 +108,44 @@ jest.mock("@aws-sdk/client-sts", () => { jest.mock("@smithy/node-http-handler", () => { const actual = jest.requireActual("@smithy/node-http-handler"); + + class MockNodeHttpHandler { + static create(instanceOrOptions?: any) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new MockNodeHttpHandler(); + } + async handle(request: any, ...args: any[]) { + if (request.headers.Authorization === "container-authorization") { + const body = new Readable(); + body.push( + JSON.stringify({ + AccessKeyId: "CONTAINER_ACCESS_KEY", + SecretAccessKey: "CONTAINER_SECRET_ACCESS_KEY", + Token: "CONTAINER_TOKEN", + Expiration: "3000-01-01T00:00:00.000Z", + }) + ); + body.push(null); + return { + response: new HttpResponse({ + statusCode: 200, + body, + headers: { + "content-type": "application/json", + }, + }), + }; + } else { + throw new Error("request not supported."); + } + } + } + return { ...actual, - NodeHttpHandler: class { - async handle(request: any, ...args: any[]) { - if (request.headers.Authorization === "container-authorization") { - const body = new Readable(); - body.push( - JSON.stringify({ - AccessKeyId: "CONTAINER_ACCESS_KEY", - SecretAccessKey: "CONTAINER_SECRET_ACCESS_KEY", - Token: "CONTAINER_TOKEN", - Expiration: "3000-01-01T00:00:00.000Z", - }) - ); - body.push(null); - return { - response: new HttpResponse({ - statusCode: 200, - body, - headers: { - "content-type": "application/json", - }, - }), - }; - } else { - return actual.NodeHttpHandler.prototype.handle.bind(this)(request, ...args); - } - } - }, + NodeHttpHandler: MockNodeHttpHandler, }; }); diff --git a/packages/credential-provider-process/package.json b/packages/credential-provider-process/package.json index 32b7cb776f0c..549df50d9966 100644 --- a/packages/credential-provider-process/package.json +++ b/packages/credential-provider-process/package.json @@ -27,7 +27,7 @@ "@aws-sdk/types": "*", "@smithy/property-provider": "^2.1.1", "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/credential-provider-sso/package.json b/packages/credential-provider-sso/package.json index 36e42575c61d..41e832292e2c 100644 --- a/packages/credential-provider-sso/package.json +++ b/packages/credential-provider-sso/package.json @@ -29,7 +29,7 @@ "@aws-sdk/types": "*", "@smithy/property-provider": "^2.1.1", "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/credential-provider-web-identity/package.json b/packages/credential-provider-web-identity/package.json index f729b35af759..c42efa49ef12 100644 --- a/packages/credential-provider-web-identity/package.json +++ b/packages/credential-provider-web-identity/package.json @@ -35,7 +35,7 @@ "@aws-sdk/client-sts": "*", "@aws-sdk/types": "*", "@smithy/property-provider": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/credential-providers/package.json b/packages/credential-providers/package.json index 3a5507d802f8..e47fe9e1fa12 100644 --- a/packages/credential-providers/package.json +++ b/packages/credential-providers/package.json @@ -42,7 +42,7 @@ "@aws-sdk/types": "*", "@smithy/credential-provider-imds": "^2.2.1", "@smithy/property-provider": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/eventstream-handler-node/package.json b/packages/eventstream-handler-node/package.json index b8f5e8c5b389..6da0ab85208b 100644 --- a/packages/eventstream-handler-node/package.json +++ b/packages/eventstream-handler-node/package.json @@ -22,7 +22,7 @@ "dependencies": { "@aws-sdk/types": "*", "@smithy/eventstream-codec": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/middleware-api-key/package.json b/packages/middleware-api-key/package.json index 28f5bfb53cd6..842002e29be5 100644 --- a/packages/middleware-api-key/package.json +++ b/packages/middleware-api-key/package.json @@ -21,9 +21,9 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-middleware": "^2.1.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", + "@smithy/util-middleware": "^2.1.2", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-bucket-endpoint/package.json b/packages/middleware-bucket-endpoint/package.json index c721f3ed9315..12dcf78b672d 100644 --- a/packages/middleware-bucket-endpoint/package.json +++ b/packages/middleware-bucket-endpoint/package.json @@ -23,9 +23,9 @@ "dependencies": { "@aws-sdk/types": "*", "@aws-sdk/util-arn-parser": "*", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "@smithy/util-config-provider": "^2.2.1", "tslib": "^2.5.0" }, diff --git a/packages/middleware-endpoint-discovery/package.json b/packages/middleware-endpoint-discovery/package.json index c8a1b7fa124b..a2ae955b7585 100644 --- a/packages/middleware-endpoint-discovery/package.json +++ b/packages/middleware-endpoint-discovery/package.json @@ -30,9 +30,9 @@ "dependencies": { "@aws-sdk/endpoint-cache": "*", "@aws-sdk/types": "*", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-eventstream/package.json b/packages/middleware-eventstream/package.json index 91f2e3a325c5..0008818e0dd6 100644 --- a/packages/middleware-eventstream/package.json +++ b/packages/middleware-eventstream/package.json @@ -22,8 +22,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-expect-continue/package.json b/packages/middleware-expect-continue/package.json index 7fbc2f56f81b..356c2f403bfe 100644 --- a/packages/middleware-expect-continue/package.json +++ b/packages/middleware-expect-continue/package.json @@ -22,8 +22,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-flexible-checksums/package.json b/packages/middleware-flexible-checksums/package.json index 94376fd396f6..f0b65854c8db 100644 --- a/packages/middleware-flexible-checksums/package.json +++ b/packages/middleware-flexible-checksums/package.json @@ -32,13 +32,13 @@ "@aws-crypto/crc32c": "3.0.0", "@aws-sdk/types": "*", "@smithy/is-array-buffer": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, "devDependencies": { - "@smithy/node-http-handler": "^2.3.1", + "@smithy/node-http-handler": "^2.4.0", "concurrently": "7.0.0", "downlevel-dts": "0.10.1", "rimraf": "3.0.2", diff --git a/packages/middleware-host-header/package.json b/packages/middleware-host-header/package.json index a14d374e2941..3d582f8d9508 100644 --- a/packages/middleware-host-header/package.json +++ b/packages/middleware-host-header/package.json @@ -22,8 +22,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-location-constraint/package.json b/packages/middleware-location-constraint/package.json index 246db49be2ea..6a270a8482d8 100644 --- a/packages/middleware-location-constraint/package.json +++ b/packages/middleware-location-constraint/package.json @@ -22,7 +22,7 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-logger/package.json b/packages/middleware-logger/package.json index a4fe5121b9d7..2c2b4ea9cab6 100644 --- a/packages/middleware-logger/package.json +++ b/packages/middleware-logger/package.json @@ -23,7 +23,7 @@ "types": "./dist-types/index.d.ts", "dependencies": { "@aws-sdk/types": "*", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/middleware-recursion-detection/package.json b/packages/middleware-recursion-detection/package.json index cf59148604aa..ff2b88ddcfd8 100644 --- a/packages/middleware-recursion-detection/package.json +++ b/packages/middleware-recursion-detection/package.json @@ -22,8 +22,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-sdk-api-gateway/package.json b/packages/middleware-sdk-api-gateway/package.json index a7363e0c591d..410d3f74f2dc 100644 --- a/packages/middleware-sdk-api-gateway/package.json +++ b/packages/middleware-sdk-api-gateway/package.json @@ -22,8 +22,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-sdk-ec2/package.json b/packages/middleware-sdk-ec2/package.json index bb8851ed0fd4..f2bbfbc2b10c 100644 --- a/packages/middleware-sdk-ec2/package.json +++ b/packages/middleware-sdk-ec2/package.json @@ -23,11 +23,11 @@ "dependencies": { "@aws-sdk/types": "*", "@aws-sdk/util-format-url": "*", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/protocol-http": "^3.1.1", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-sdk-glacier/package.json b/packages/middleware-sdk-glacier/package.json index 1afffcf87b01..4101f9914504 100644 --- a/packages/middleware-sdk-glacier/package.json +++ b/packages/middleware-sdk-glacier/package.json @@ -22,8 +22,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-sdk-machinelearning/package.json b/packages/middleware-sdk-machinelearning/package.json index 894f9c98ed72..8c0e37e24872 100644 --- a/packages/middleware-sdk-machinelearning/package.json +++ b/packages/middleware-sdk-machinelearning/package.json @@ -22,8 +22,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-sdk-rds/package.json b/packages/middleware-sdk-rds/package.json index 0e1c8678af3a..74a6e2a3edbd 100644 --- a/packages/middleware-sdk-rds/package.json +++ b/packages/middleware-sdk-rds/package.json @@ -23,10 +23,10 @@ "dependencies": { "@aws-sdk/types": "*", "@aws-sdk/util-format-url": "*", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/protocol-http": "^3.1.1", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-sdk-route53/package.json b/packages/middleware-sdk-route53/package.json index 5544de4d9dad..c6733ca9f2d4 100644 --- a/packages/middleware-sdk-route53/package.json +++ b/packages/middleware-sdk-route53/package.json @@ -22,7 +22,7 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-sdk-s3-control/package.json b/packages/middleware-sdk-s3-control/package.json index 5d492fc3ed05..ab77429f9701 100644 --- a/packages/middleware-sdk-s3-control/package.json +++ b/packages/middleware-sdk-s3-control/package.json @@ -26,13 +26,13 @@ "@aws-sdk/types": "*", "@aws-sdk/util-arn-parser": "*", "@aws-sdk/util-endpoints": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-endpoints": "^1.1.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", + "@smithy/util-endpoints": "^1.1.2", "tslib": "^2.5.0" }, "devDependencies": { - "@smithy/middleware-stack": "^2.1.1", + "@smithy/middleware-stack": "^2.1.2", "@tsconfig/recommended": "1.0.1", "concurrently": "7.0.0", "downlevel-dts": "0.10.1", diff --git a/packages/middleware-sdk-s3/package.json b/packages/middleware-sdk-s3/package.json index 27387d7527ca..4571df55e6e6 100644 --- a/packages/middleware-sdk-s3/package.json +++ b/packages/middleware-sdk-s3/package.json @@ -25,11 +25,11 @@ "dependencies": { "@aws-sdk/types": "*", "@aws-sdk/util-arn-parser": "*", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/protocol-http": "^3.1.1", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", "@smithy/util-config-provider": "^2.2.1", "tslib": "^2.5.0" }, diff --git a/packages/middleware-sdk-sqs/package.json b/packages/middleware-sdk-sqs/package.json index 3f7a79acc21e..f920e126af55 100644 --- a/packages/middleware-sdk-sqs/package.json +++ b/packages/middleware-sdk-sqs/package.json @@ -22,8 +22,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", "@smithy/util-hex-encoding": "^2.1.1", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" diff --git a/packages/middleware-sdk-sts/package.json b/packages/middleware-sdk-sts/package.json index 382475e589b4..495a5688abb3 100644 --- a/packages/middleware-sdk-sts/package.json +++ b/packages/middleware-sdk-sts/package.json @@ -23,7 +23,7 @@ "dependencies": { "@aws-sdk/middleware-signing": "*", "@aws-sdk/types": "*", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-sdk-transcribe-streaming/package.json b/packages/middleware-sdk-transcribe-streaming/package.json index e6d2a94930e2..340172a2de1d 100644 --- a/packages/middleware-sdk-transcribe-streaming/package.json +++ b/packages/middleware-sdk-transcribe-streaming/package.json @@ -23,10 +23,10 @@ "dependencies": { "@aws-sdk/types": "*", "@aws-sdk/util-format-url": "*", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0", "uuid": "^9.0.1" }, diff --git a/packages/middleware-signing/package.json b/packages/middleware-signing/package.json index 4bb89cec4bf1..e7d92c14ee68 100644 --- a/packages/middleware-signing/package.json +++ b/packages/middleware-signing/package.json @@ -24,10 +24,10 @@ "dependencies": { "@aws-sdk/types": "*", "@smithy/property-provider": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-middleware": "^2.1.1", + "@smithy/types": "^2.10.0", + "@smithy/util-middleware": "^2.1.2", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-ssec/package.json b/packages/middleware-ssec/package.json index 4dbe3a306282..c9b19e056bde 100644 --- a/packages/middleware-ssec/package.json +++ b/packages/middleware-ssec/package.json @@ -22,7 +22,7 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/middleware-token/package.json b/packages/middleware-token/package.json index 73d06a2c84e3..2acc5ef0e8a3 100644 --- a/packages/middleware-token/package.json +++ b/packages/middleware-token/package.json @@ -29,9 +29,9 @@ "@aws-sdk/token-providers": "*", "@aws-sdk/types": "*", "@smithy/property-provider": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-middleware": "^2.1.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", + "@smithy/util-middleware": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/middleware-user-agent/package.json b/packages/middleware-user-agent/package.json index e98d4743be0f..d7bb9c447bfe 100644 --- a/packages/middleware-user-agent/package.json +++ b/packages/middleware-user-agent/package.json @@ -24,8 +24,8 @@ "dependencies": { "@aws-sdk/types": "*", "@aws-sdk/util-endpoints": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/middleware-websocket/package.json b/packages/middleware-websocket/package.json index bc9f4f67a657..5ee677a8fff1 100644 --- a/packages/middleware-websocket/package.json +++ b/packages/middleware-websocket/package.json @@ -25,11 +25,11 @@ "@aws-sdk/types": "*", "@aws-sdk/util-format-url": "*", "@smithy/eventstream-codec": "^2.1.1", - "@smithy/eventstream-serde-browser": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/protocol-http": "^3.1.1", + "@smithy/eventstream-serde-browser": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "@smithy/util-hex-encoding": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/packages/middleware-websocket/src/websocket-fetch-handler.ts b/packages/middleware-websocket/src/websocket-fetch-handler.ts index 22481c3d73f8..23e72bfd63be 100644 --- a/packages/middleware-websocket/src/websocket-fetch-handler.ts +++ b/packages/middleware-websocket/src/websocket-fetch-handler.ts @@ -1,7 +1,7 @@ import { formatUrl } from "@aws-sdk/util-format-url"; import { iterableToReadableStream, readableStreamtoIterable } from "@smithy/eventstream-serde-browser"; import { FetchHttpHandler } from "@smithy/fetch-http-handler"; -import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http"; +import { HttpRequest, HttpResponse } from "@smithy/protocol-http"; import { Provider, RequestHandler, RequestHandlerMetadata } from "@smithy/types"; import { isWebSocketRequest } from "./utils"; @@ -26,7 +26,8 @@ export class WebSocketFetchHandler { public readonly metadata: RequestHandlerMetadata = { handlerProtocol: "websocket/h1.1", }; - private readonly configPromise: Promise; + private config: WebSocketFetchHandlerOptions; + private configPromise: Promise; private readonly httpHandler: RequestHandler; private readonly sockets: Record = {}; @@ -35,12 +36,15 @@ export class WebSocketFetchHandler { * or instantiates a new instance of this handler. */ public static create( - instanceOrOptions?: HttpHandler | WebSocketFetchHandlerOptions | Provider, + instanceOrOptions?: + | WebSocketFetchHandler + | WebSocketFetchHandlerOptions + | Provider, httpHandler: RequestHandler = new FetchHttpHandler() ) { if (typeof (instanceOrOptions as any)?.handle === "function") { // is already an instance of HttpHandler. - return instanceOrOptions as HttpHandler; + return instanceOrOptions as WebSocketFetchHandler; } // input is ctor options or undefined. return new WebSocketFetchHandler( @@ -55,9 +59,11 @@ export class WebSocketFetchHandler { ) { this.httpHandler = httpHandler; if (typeof options === "function") { - this.configPromise = options().then((opts) => opts ?? {}); + this.config = {}; + this.configPromise = options().then((opts) => (this.config = opts ?? {})); } else { - this.configPromise = Promise.resolve(options ?? {}); + this.config = options ?? {}; + this.configPromise = Promise.resolve(this.config); } } @@ -88,7 +94,8 @@ export class WebSocketFetchHandler { this.sockets[url].push(socket); socket.binaryType = "arraybuffer"; - const { connectionTimeout = DEFAULT_WS_CONNECTION_TIMEOUT_MS } = await this.configPromise; + this.config = await this.configPromise; + const { connectionTimeout = DEFAULT_WS_CONNECTION_TIMEOUT_MS } = this.config; await this.waitForReady(socket, connectionTimeout); const { body } = request; const bodyStream = getIterator(body); @@ -102,6 +109,20 @@ export class WebSocketFetchHandler { }; } + updateHttpClientConfig( + key: keyof WebSocketFetchHandlerOptions, + value: WebSocketFetchHandlerOptions[typeof key] + ): void { + this.configPromise = this.configPromise.then((config) => { + (config as Record)[key] = value; + return config; + }); + } + + httpHandlerConfigs(): WebSocketFetchHandlerOptions { + return this.config ?? {}; + } + /** * Removes all closing/closed sockets from the socket pool for URL. */ diff --git a/packages/polly-request-presigner/package.json b/packages/polly-request-presigner/package.json index 4e5de65c7621..0f52fa48397c 100644 --- a/packages/polly-request-presigner/package.json +++ b/packages/polly-request-presigner/package.json @@ -24,9 +24,9 @@ "@aws-sdk/client-polly": "*", "@aws-sdk/types": "*", "@aws-sdk/util-format-url": "*", - "@smithy/protocol-http": "^3.1.1", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/rds-signer/package.json b/packages/rds-signer/package.json index 9edfdae360b8..f093c0fa5b82 100644 --- a/packages/rds-signer/package.json +++ b/packages/rds-signer/package.json @@ -29,13 +29,13 @@ "@aws-crypto/sha256-js": "3.0.0", "@aws-sdk/credential-providers": "*", "@aws-sdk/util-format-url": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/protocol-http": "^3.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/region-config-resolver/package.json b/packages/region-config-resolver/package.json index 0408ea626a4c..daa541196c18 100644 --- a/packages/region-config-resolver/package.json +++ b/packages/region-config-resolver/package.json @@ -22,10 +22,10 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/types": "^2.9.1", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/types": "^2.10.0", "@smithy/util-config-provider": "^2.2.1", - "@smithy/util-middleware": "^2.1.1", + "@smithy/util-middleware": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/s3-presigned-post/package.json b/packages/s3-presigned-post/package.json index c3cff27d9b46..d87023d562f9 100644 --- a/packages/s3-presigned-post/package.json +++ b/packages/s3-presigned-post/package.json @@ -25,9 +25,9 @@ "@aws-sdk/client-s3": "*", "@aws-sdk/types": "*", "@aws-sdk/util-format-url": "*", - "@smithy/middleware-endpoint": "^2.4.1", + "@smithy/middleware-endpoint": "^2.4.2", "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "@smithy/util-hex-encoding": "^2.1.1", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" diff --git a/packages/s3-request-presigner/package.json b/packages/s3-request-presigner/package.json index c286503ed739..7504011935c3 100644 --- a/packages/s3-request-presigner/package.json +++ b/packages/s3-request-presigner/package.json @@ -24,15 +24,15 @@ "@aws-sdk/signature-v4-multi-region": "*", "@aws-sdk/types": "*", "@aws-sdk/util-format-url": "*", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/middleware-endpoint": "^2.4.2", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { "@aws-sdk/client-s3": "*", - "@smithy/hash-node": "^2.1.1", + "@smithy/hash-node": "^2.1.2", "@tsconfig/recommended": "1.0.1", "@types/node": "^14.14.31", "concurrently": "7.0.0", diff --git a/packages/sha256-tree-hash/package.json b/packages/sha256-tree-hash/package.json index 3956270c0f26..84a6147009d6 100644 --- a/packages/sha256-tree-hash/package.json +++ b/packages/sha256-tree-hash/package.json @@ -21,7 +21,7 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/signature-v4-crt/package.json b/packages/signature-v4-crt/package.json index a7444893e4c3..89ef69754187 100644 --- a/packages/signature-v4-crt/package.json +++ b/packages/signature-v4-crt/package.json @@ -27,14 +27,14 @@ "@aws-sdk/util-user-agent-node": "*", "@smithy/querystring-parser": "^2.1.1", "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-middleware": "^2.1.1", + "@smithy/types": "^2.10.0", + "@smithy/util-middleware": "^2.1.2", "aws-crt": "^1.18.3", "tslib": "^2.5.0" }, "devDependencies": { "@aws-crypto/sha256-js": "3.0.0", - "@smithy/protocol-http": "^3.1.1", + "@smithy/protocol-http": "^3.2.0", "@tsconfig/recommended": "1.0.1", "concurrently": "7.0.0", "downlevel-dts": "0.10.1", diff --git a/packages/signature-v4-multi-region/package.json b/packages/signature-v4-multi-region/package.json index d071edd69ab4..508bbe175a76 100644 --- a/packages/signature-v4-multi-region/package.json +++ b/packages/signature-v4-multi-region/package.json @@ -22,9 +22,9 @@ "dependencies": { "@aws-sdk/middleware-sdk-s3": "*", "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", + "@smithy/protocol-http": "^3.2.0", "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/smithy-client/package.json b/packages/smithy-client/package.json index 7441a8ed273f..5693b4724060 100644 --- a/packages/smithy-client/package.json +++ b/packages/smithy-client/package.json @@ -22,7 +22,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@smithy/smithy-client": "^2.3.1", + "@smithy/smithy-client": "^2.4.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/token-providers/package.json b/packages/token-providers/package.json index bf48bf4d3a60..623ddceb6433 100644 --- a/packages/token-providers/package.json +++ b/packages/token-providers/package.json @@ -30,7 +30,7 @@ "@aws-sdk/types": "*", "@smithy/property-provider": "^2.1.1", "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/types/package.json b/packages/types/package.json index 2706b90b8d3b..e57a9c3adbde 100755 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -41,7 +41,7 @@ "directory": "packages/types" }, "dependencies": { - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/util-create-request/package.json b/packages/util-create-request/package.json index 7adf294970c9..f764f6f24bd7 100644 --- a/packages/util-create-request/package.json +++ b/packages/util-create-request/package.json @@ -22,13 +22,13 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { - "@smithy/protocol-http": "^3.1.1", + "@smithy/protocol-http": "^3.2.0", "@tsconfig/recommended": "1.0.1", "@types/node": "^14.14.31", "concurrently": "7.0.0", diff --git a/packages/util-endpoints/package.json b/packages/util-endpoints/package.json index 1a39456be476..8fe2f8a2a8cf 100644 --- a/packages/util-endpoints/package.json +++ b/packages/util-endpoints/package.json @@ -23,8 +23,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/types": "^2.9.1", - "@smithy/util-endpoints": "^1.1.1", + "@smithy/types": "^2.10.0", + "@smithy/util-endpoints": "^1.1.2", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/util-format-url/package.json b/packages/util-format-url/package.json index 21dd3e1c52f3..db69e19c1cc7 100644 --- a/packages/util-format-url/package.json +++ b/packages/util-format-url/package.json @@ -21,8 +21,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/querystring-builder": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/querystring-builder": "^2.1.2", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "engines": { diff --git a/packages/util-user-agent-browser/package.json b/packages/util-user-agent-browser/package.json index 52ffa1b775c8..74082da2983d 100644 --- a/packages/util-user-agent-browser/package.json +++ b/packages/util-user-agent-browser/package.json @@ -23,7 +23,7 @@ "react-native": "dist-es/index.native.js", "dependencies": { "@aws-sdk/types": "*", - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, diff --git a/packages/util-user-agent-node/package.json b/packages/util-user-agent-node/package.json index 3461512c077f..ce382babae71 100644 --- a/packages/util-user-agent-node/package.json +++ b/packages/util-user-agent-node/package.json @@ -21,8 +21,8 @@ "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "*", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/types": "^2.9.1", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/packages/xhr-http-handler/package.json b/packages/xhr-http-handler/package.json index 4d10a404cb4e..d4d189f4ad94 100644 --- a/packages/xhr-http-handler/package.json +++ b/packages/xhr-http-handler/package.json @@ -20,9 +20,9 @@ "types": "./dist-types/index.d.ts", "dependencies": { "@aws-sdk/types": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/querystring-builder": "^2.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/querystring-builder": "^2.1.2", + "@smithy/types": "^2.10.0", "events": "3.3.0", "tslib": "^2.5.0" }, diff --git a/packages/xml-builder/package.json b/packages/xml-builder/package.json index 6929a97412de..70d7ed84bbe0 100644 --- a/packages/xml-builder/package.json +++ b/packages/xml-builder/package.json @@ -3,7 +3,7 @@ "version": "3.496.0", "description": "XML builder for the AWS SDK", "dependencies": { - "@smithy/types": "^2.9.1", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "scripts": { diff --git a/private/aws-client-api-test/package.json b/private/aws-client-api-test/package.json index 026bba6231c1..3f0d3fb2a924 100644 --- a/private/aws-client-api-test/package.json +++ b/private/aws-client-api-test/package.json @@ -18,21 +18,21 @@ "sideEffects": false, "dependencies": { "@aws-sdk/client-s3": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/eventstream-serde-node": "^2.1.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/hash-stream-node": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/eventstream-serde-node": "^2.1.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/hash-stream-node": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/private/aws-client-retry-test/package.json b/private/aws-client-retry-test/package.json index b0fd420da49f..7d7ae694a416 100644 --- a/private/aws-client-retry-test/package.json +++ b/private/aws-client-retry-test/package.json @@ -18,9 +18,9 @@ "sideEffects": false, "dependencies": { "@aws-sdk/client-s3": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", + "@smithy/util-retry": "^2.1.2", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/private/aws-echo-service/package.json b/private/aws-echo-service/package.json index 25aad8e1b6f2..8ba497b75fdb 100644 --- a/private/aws-echo-service/package.json +++ b/private/aws-echo-service/package.json @@ -26,27 +26,27 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/private/aws-echo-service/src/EchoServiceClient.ts b/private/aws-echo-service/src/EchoServiceClient.ts index 36a74ee40402..644d9441a990 100644 --- a/private/aws-echo-service/src/EchoServiceClient.ts +++ b/private/aws-echo-service/src/EchoServiceClient.ts @@ -24,7 +24,7 @@ import { } from "@smithy/config-resolver"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -62,11 +62,11 @@ export type ServiceOutputTypes = EchoCommandOutput | LengthCommandOutput; /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/private/aws-echo-service/src/runtimeConfig.browser.ts b/private/aws-echo-service/src/runtimeConfig.browser.ts index 18197ac6ef80..cf847b4415a6 100644 --- a/private/aws-echo-service/src/runtimeConfig.browser.ts +++ b/private/aws-echo-service/src/runtimeConfig.browser.ts @@ -28,7 +28,7 @@ export const getRuntimeConfig = (config: EchoServiceClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/private/aws-echo-service/src/runtimeConfig.ts b/private/aws-echo-service/src/runtimeConfig.ts index aeafd1dffe04..9d7f78c7c9cd 100644 --- a/private/aws-echo-service/src/runtimeConfig.ts +++ b/private/aws-echo-service/src/runtimeConfig.ts @@ -32,7 +32,7 @@ export const getRuntimeConfig = (config: EchoServiceClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/private/aws-middleware-test/package.json b/private/aws-middleware-test/package.json index 46f4d6a6a43f..470853d04f24 100644 --- a/private/aws-middleware-test/package.json +++ b/private/aws-middleware-test/package.json @@ -25,9 +25,9 @@ "@aws-sdk/client-sagemaker": "*", "@aws-sdk/client-sagemaker-runtime": "*", "@aws-sdk/client-xray": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/private/aws-protocoltests-ec2/package.json b/private/aws-protocoltests-ec2/package.json index 5c9480b0983c..b83a4cffdb68 100644 --- a/private/aws-protocoltests-ec2/package.json +++ b/private/aws-protocoltests-ec2/package.json @@ -28,27 +28,27 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-compression": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-compression": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0", diff --git a/private/aws-protocoltests-ec2/src/EC2ProtocolClient.ts b/private/aws-protocoltests-ec2/src/EC2ProtocolClient.ts index a7557dd7cfab..5249ffc72f2f 100644 --- a/private/aws-protocoltests-ec2/src/EC2ProtocolClient.ts +++ b/private/aws-protocoltests-ec2/src/EC2ProtocolClient.ts @@ -28,7 +28,7 @@ import { } from "@smithy/middleware-compression"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -166,11 +166,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/private/aws-protocoltests-ec2/src/runtimeConfig.browser.ts b/private/aws-protocoltests-ec2/src/runtimeConfig.browser.ts index 0bb7b557bb01..cd5e0bada95a 100644 --- a/private/aws-protocoltests-ec2/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-ec2/src/runtimeConfig.browser.ts @@ -35,7 +35,7 @@ export const getRuntimeConfig = (config: EC2ProtocolClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), disableRequestCompression: config?.disableRequestCompression ?? DEFAULT_DISABLE_REQUEST_COMPRESSION, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES, retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), diff --git a/private/aws-protocoltests-ec2/src/runtimeConfig.ts b/private/aws-protocoltests-ec2/src/runtimeConfig.ts index 22ff259daf70..2ad46b50f17c 100644 --- a/private/aws-protocoltests-ec2/src/runtimeConfig.ts +++ b/private/aws-protocoltests-ec2/src/runtimeConfig.ts @@ -45,7 +45,7 @@ export const getRuntimeConfig = (config: EC2ProtocolClientConfig) => { disableRequestCompression: config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS), retryMode: diff --git a/private/aws-protocoltests-json-10/package.json b/private/aws-protocoltests-json-10/package.json index 44fce0970a60..d170eb1f6c2a 100644 --- a/private/aws-protocoltests-json-10/package.json +++ b/private/aws-protocoltests-json-10/package.json @@ -28,27 +28,27 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-compression": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-compression": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-json-10/src/JSONRPC10Client.ts b/private/aws-protocoltests-json-10/src/JSONRPC10Client.ts index d61d1ed6df55..e7741d98c789 100644 --- a/private/aws-protocoltests-json-10/src/JSONRPC10Client.ts +++ b/private/aws-protocoltests-json-10/src/JSONRPC10Client.ts @@ -28,7 +28,7 @@ import { } from "@smithy/middleware-compression"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -133,11 +133,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/private/aws-protocoltests-json-10/src/runtimeConfig.browser.ts b/private/aws-protocoltests-json-10/src/runtimeConfig.browser.ts index 63f43906b2a2..d229adac95aa 100644 --- a/private/aws-protocoltests-json-10/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-json-10/src/runtimeConfig.browser.ts @@ -35,7 +35,7 @@ export const getRuntimeConfig = (config: JSONRPC10ClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), disableRequestCompression: config?.disableRequestCompression ?? DEFAULT_DISABLE_REQUEST_COMPRESSION, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES, retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), diff --git a/private/aws-protocoltests-json-10/src/runtimeConfig.ts b/private/aws-protocoltests-json-10/src/runtimeConfig.ts index 2464fea7233c..695d9b04f435 100644 --- a/private/aws-protocoltests-json-10/src/runtimeConfig.ts +++ b/private/aws-protocoltests-json-10/src/runtimeConfig.ts @@ -45,7 +45,7 @@ export const getRuntimeConfig = (config: JSONRPC10ClientConfig) => { disableRequestCompression: config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS), retryMode: diff --git a/private/aws-protocoltests-json/package.json b/private/aws-protocoltests-json/package.json index aa50ff207735..0aacb2d51352 100644 --- a/private/aws-protocoltests-json/package.json +++ b/private/aws-protocoltests-json/package.json @@ -31,27 +31,27 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-compression": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-compression": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-json/src/JsonProtocolClient.ts b/private/aws-protocoltests-json/src/JsonProtocolClient.ts index 68c6099c4eed..78ada98fdd43 100644 --- a/private/aws-protocoltests-json/src/JsonProtocolClient.ts +++ b/private/aws-protocoltests-json/src/JsonProtocolClient.ts @@ -35,7 +35,7 @@ import { } from "@smithy/middleware-compression"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -143,11 +143,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/private/aws-protocoltests-json/src/runtimeConfig.browser.ts b/private/aws-protocoltests-json/src/runtimeConfig.browser.ts index 2f2105bfd956..e0ca0711b13f 100644 --- a/private/aws-protocoltests-json/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-json/src/runtimeConfig.browser.ts @@ -39,7 +39,7 @@ export const getRuntimeConfig = (config: JsonProtocolClientConfig) => { disableRequestCompression: config?.disableRequestCompression ?? DEFAULT_DISABLE_REQUEST_COMPRESSION, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES, retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), diff --git a/private/aws-protocoltests-json/src/runtimeConfig.ts b/private/aws-protocoltests-json/src/runtimeConfig.ts index cdb1e8815afb..db0faeee8f47 100644 --- a/private/aws-protocoltests-json/src/runtimeConfig.ts +++ b/private/aws-protocoltests-json/src/runtimeConfig.ts @@ -50,7 +50,7 @@ export const getRuntimeConfig = (config: JsonProtocolClientConfig) => { config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS), retryMode: diff --git a/private/aws-protocoltests-query/package.json b/private/aws-protocoltests-query/package.json index c35e6b11cdf0..404e8a67c6ee 100644 --- a/private/aws-protocoltests-query/package.json +++ b/private/aws-protocoltests-query/package.json @@ -28,27 +28,27 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-compression": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-compression": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0", diff --git a/private/aws-protocoltests-query/src/QueryProtocolClient.ts b/private/aws-protocoltests-query/src/QueryProtocolClient.ts index 50dc7408a909..325f4c858f8d 100644 --- a/private/aws-protocoltests-query/src/QueryProtocolClient.ts +++ b/private/aws-protocoltests-query/src/QueryProtocolClient.ts @@ -28,7 +28,7 @@ import { } from "@smithy/middleware-compression"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -196,11 +196,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/private/aws-protocoltests-query/src/runtimeConfig.browser.ts b/private/aws-protocoltests-query/src/runtimeConfig.browser.ts index 0bc4fc141def..65734d2c7f59 100644 --- a/private/aws-protocoltests-query/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-query/src/runtimeConfig.browser.ts @@ -35,7 +35,7 @@ export const getRuntimeConfig = (config: QueryProtocolClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), disableRequestCompression: config?.disableRequestCompression ?? DEFAULT_DISABLE_REQUEST_COMPRESSION, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES, retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), diff --git a/private/aws-protocoltests-query/src/runtimeConfig.ts b/private/aws-protocoltests-query/src/runtimeConfig.ts index 661d051741e5..ff6e93ecb6b9 100644 --- a/private/aws-protocoltests-query/src/runtimeConfig.ts +++ b/private/aws-protocoltests-query/src/runtimeConfig.ts @@ -45,7 +45,7 @@ export const getRuntimeConfig = (config: QueryProtocolClientConfig) => { disableRequestCompression: config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS), retryMode: diff --git a/private/aws-protocoltests-restjson/package.json b/private/aws-protocoltests-restjson/package.json index 2323dcbae583..27255ef58c50 100644 --- a/private/aws-protocoltests-restjson/package.json +++ b/private/aws-protocoltests-restjson/package.json @@ -28,34 +28,34 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-blob-browser": "^2.1.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/hash-stream-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/md5-js": "^2.1.1", - "@smithy/middleware-apply-body-checksum": "^2.1.1", - "@smithy/middleware-compression": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/querystring-builder": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-blob-browser": "^2.1.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/hash-stream-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/md5-js": "^2.1.2", + "@smithy/middleware-apply-body-checksum": "^2.1.2", + "@smithy/middleware-compression": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/querystring-builder": "^2.1.2", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0", "uuid": "^9.0.1" diff --git a/private/aws-protocoltests-restjson/src/RestJsonProtocolClient.ts b/private/aws-protocoltests-restjson/src/RestJsonProtocolClient.ts index c9a413f570d9..26da053dbe47 100644 --- a/private/aws-protocoltests-restjson/src/RestJsonProtocolClient.ts +++ b/private/aws-protocoltests-restjson/src/RestJsonProtocolClient.ts @@ -28,7 +28,7 @@ import { } from "@smithy/middleware-compression"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -506,11 +506,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/private/aws-protocoltests-restjson/src/runtimeConfig.browser.ts b/private/aws-protocoltests-restjson/src/runtimeConfig.browser.ts index eb10431aa6ec..79d7d04c9dd4 100644 --- a/private/aws-protocoltests-restjson/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-restjson/src/runtimeConfig.browser.ts @@ -38,7 +38,7 @@ export const getRuntimeConfig = (config: RestJsonProtocolClientConfig) => { disableRequestCompression: config?.disableRequestCompression ?? DEFAULT_DISABLE_REQUEST_COMPRESSION, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, md5: config?.md5 ?? Md5, - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES, retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), diff --git a/private/aws-protocoltests-restjson/src/runtimeConfig.ts b/private/aws-protocoltests-restjson/src/runtimeConfig.ts index 669349b3afec..7778de85a67a 100644 --- a/private/aws-protocoltests-restjson/src/runtimeConfig.ts +++ b/private/aws-protocoltests-restjson/src/runtimeConfig.ts @@ -47,7 +47,7 @@ export const getRuntimeConfig = (config: RestJsonProtocolClientConfig) => { config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), md5: config?.md5 ?? Hash.bind(null, "md5"), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS), retryMode: diff --git a/private/aws-protocoltests-restxml/package.json b/private/aws-protocoltests-restxml/package.json index 1ad3d6bb160e..ed5f24281f82 100644 --- a/private/aws-protocoltests-restxml/package.json +++ b/private/aws-protocoltests-restxml/package.json @@ -29,30 +29,30 @@ "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", "@aws-sdk/xml-builder": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-compression": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/querystring-builder": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-compression": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/querystring-builder": "^2.1.2", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-stream": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-retry": "^2.1.2", + "@smithy/util-stream": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "entities": "2.2.0", "fast-xml-parser": "4.2.5", diff --git a/private/aws-protocoltests-restxml/src/RestXmlProtocolClient.ts b/private/aws-protocoltests-restxml/src/RestXmlProtocolClient.ts index db6c521cd827..39b7df2758a0 100644 --- a/private/aws-protocoltests-restxml/src/RestXmlProtocolClient.ts +++ b/private/aws-protocoltests-restxml/src/RestXmlProtocolClient.ts @@ -28,7 +28,7 @@ import { } from "@smithy/middleware-compression"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -346,11 +346,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/private/aws-protocoltests-restxml/src/runtimeConfig.browser.ts b/private/aws-protocoltests-restxml/src/runtimeConfig.browser.ts index d7ac083b4f2d..ccd273315eed 100644 --- a/private/aws-protocoltests-restxml/src/runtimeConfig.browser.ts +++ b/private/aws-protocoltests-restxml/src/runtimeConfig.browser.ts @@ -35,7 +35,7 @@ export const getRuntimeConfig = (config: RestXmlProtocolClientConfig) => { defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), disableRequestCompression: config?.disableRequestCompression ?? DEFAULT_DISABLE_REQUEST_COMPRESSION, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES, retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), diff --git a/private/aws-protocoltests-restxml/src/runtimeConfig.ts b/private/aws-protocoltests-restxml/src/runtimeConfig.ts index 9e1e7bdc25ba..a727aa01fb1f 100644 --- a/private/aws-protocoltests-restxml/src/runtimeConfig.ts +++ b/private/aws-protocoltests-restxml/src/runtimeConfig.ts @@ -45,7 +45,7 @@ export const getRuntimeConfig = (config: RestXmlProtocolClientConfig) => { disableRequestCompression: config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS), retryMode: diff --git a/private/aws-restjson-server/package.json b/private/aws-restjson-server/package.json index dc26648f9e49..88d6a05dbe2a 100644 --- a/private/aws-restjson-server/package.json +++ b/private/aws-restjson-server/package.json @@ -23,24 +23,24 @@ "@aws-sdk/core": "*", "@aws-sdk/types": "*", "@aws-smithy/server-common": "1.0.0-alpha.10", - "@smithy/config-resolver": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/private/aws-restjson-validation-server/package.json b/private/aws-restjson-validation-server/package.json index 673810fcd9f7..de1922f0682b 100644 --- a/private/aws-restjson-validation-server/package.json +++ b/private/aws-restjson-validation-server/package.json @@ -23,24 +23,24 @@ "@aws-sdk/core": "*", "@aws-sdk/types": "*", "@aws-smithy/server-common": "1.0.0-alpha.10", - "@smithy/config-resolver": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/private/aws-util-test/package.json b/private/aws-util-test/package.json index 217621d44ad9..3ba52c56d475 100644 --- a/private/aws-util-test/package.json +++ b/private/aws-util-test/package.json @@ -17,8 +17,8 @@ "sideEffects": false, "dependencies": { "@aws-sdk/aws-protocoltests-json": "*", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", + "@smithy/protocol-http": "^3.2.0", + "@smithy/types": "^2.10.0", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/private/weather-experimental-identity-and-auth/package.json b/private/weather-experimental-identity-and-auth/package.json index 43ebaef263b1..dd5c611312ee 100644 --- a/private/weather-experimental-identity-and-auth/package.json +++ b/private/weather-experimental-identity-and-auth/package.json @@ -25,29 +25,29 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.2", - "@smithy/experimental-identity-and-auth": "^0.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/core": "^1.3.3", + "@smithy/experimental-identity-and-auth": "^0.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/private/weather-experimental-identity-and-auth/src/WeatherClient.ts b/private/weather-experimental-identity-and-auth/src/WeatherClient.ts index 876642164070..5e051225e5b6 100644 --- a/private/weather-experimental-identity-and-auth/src/WeatherClient.ts +++ b/private/weather-experimental-identity-and-auth/src/WeatherClient.ts @@ -61,7 +61,7 @@ import { import { DefaultIdentityProviderConfig, getHttpAuthSchemePlugin, getHttpSigningPlugin } from "@smithy/core"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -121,11 +121,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/private/weather-experimental-identity-and-auth/src/runtimeConfig.browser.ts b/private/weather-experimental-identity-and-auth/src/runtimeConfig.browser.ts index e262dac7fb22..a9b6fb39ecdc 100644 --- a/private/weather-experimental-identity-and-auth/src/runtimeConfig.browser.ts +++ b/private/weather-experimental-identity-and-auth/src/runtimeConfig.browser.ts @@ -28,7 +28,7 @@ export const getRuntimeConfig = (config: WeatherClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/private/weather-experimental-identity-and-auth/src/runtimeConfig.ts b/private/weather-experimental-identity-and-auth/src/runtimeConfig.ts index e39aa2be5d02..09acadd4b6ab 100644 --- a/private/weather-experimental-identity-and-auth/src/runtimeConfig.ts +++ b/private/weather-experimental-identity-and-auth/src/runtimeConfig.ts @@ -32,7 +32,7 @@ export const getRuntimeConfig = (config: WeatherClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/private/weather/package.json b/private/weather/package.json index 0c70b0ff6028..d94e656722b8 100644 --- a/private/weather/package.json +++ b/private/weather/package.json @@ -30,27 +30,27 @@ "@aws-sdk/types": "*", "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", - "@smithy/config-resolver": "^2.1.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", + "@smithy/config-resolver": "^2.1.2", + "@smithy/fetch-http-handler": "^2.4.2", + "@smithy/hash-node": "^2.1.2", + "@smithy/invalid-dependency": "^2.1.2", + "@smithy/middleware-content-length": "^2.1.2", + "@smithy/middleware-retry": "^2.1.2", + "@smithy/middleware-serde": "^2.1.2", + "@smithy/middleware-stack": "^2.1.2", + "@smithy/node-config-provider": "^2.2.2", + "@smithy/node-http-handler": "^2.4.0", + "@smithy/protocol-http": "^3.2.0", + "@smithy/smithy-client": "^2.4.0", + "@smithy/types": "^2.10.0", + "@smithy/url-parser": "^2.1.2", "@smithy/util-base64": "^2.1.1", "@smithy/util-body-length-browser": "^2.1.1", "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.2.0", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", + "@smithy/util-defaults-mode-browser": "^2.1.2", + "@smithy/util-defaults-mode-node": "^2.2.1", + "@smithy/util-middleware": "^2.1.2", + "@smithy/util-retry": "^2.1.2", "@smithy/util-utf8": "^2.1.1", "tslib": "^2.5.0" }, diff --git a/private/weather/src/WeatherClient.ts b/private/weather/src/WeatherClient.ts index 420f940276b6..add7ca08113d 100644 --- a/private/weather/src/WeatherClient.ts +++ b/private/weather/src/WeatherClient.ts @@ -62,7 +62,7 @@ import { } from "@smithy/config-resolver"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry"; -import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; import { Client as __Client, DefaultsMode as __DefaultsMode, @@ -122,11 +122,11 @@ export type ServiceOutputTypes = /** * @public */ -export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { /** - * The HTTP handler to use. Fetch in browser and Https in Nodejs. + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ - requestHandler?: __HttpHandler; + requestHandler?: __HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface diff --git a/private/weather/src/runtimeConfig.browser.ts b/private/weather/src/runtimeConfig.browser.ts index 913ee36cea93..8c5225d167e8 100644 --- a/private/weather/src/runtimeConfig.browser.ts +++ b/private/weather/src/runtimeConfig.browser.ts @@ -30,7 +30,7 @@ export const getRuntimeConfig = (config: WeatherClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), sha256: config?.sha256 ?? Sha256, streamCollector: config?.streamCollector ?? streamCollector, diff --git a/private/weather/src/runtimeConfig.ts b/private/weather/src/runtimeConfig.ts index 408360d2637f..977e82ada569 100644 --- a/private/weather/src/runtimeConfig.ts +++ b/private/weather/src/runtimeConfig.ts @@ -34,7 +34,7 @@ export const getRuntimeConfig = (config: WeatherClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ clientVersion: packageInfo.version }), maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? loadNodeConfig({ diff --git a/scripts/generate-clients/config.js b/scripts/generate-clients/config.js index ec24c5a4dbac..4bff757c5081 100644 --- a/scripts/generate-clients/config.js +++ b/scripts/generate-clients/config.js @@ -1,7 +1,7 @@ // Update this commit when taking up new changes from smithy-typescript. module.exports = { // Use full commit hash as we explicitly fetch it. - SMITHY_TS_COMMIT: "74d1aa5b97c09cb27f8ad70188d5cb02f329b25d", + SMITHY_TS_COMMIT: "3b3774052b1985a680c3db7c244c59d03357b73c", }; if (module.exports.SMITHY_TS_COMMIT.length < 40) { diff --git a/yarn.lock b/yarn.lock index 36b06b4f1f3a..b21b0309e048 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2788,6 +2788,14 @@ "@smithy/types" "^2.9.1" tslib "^2.5.0" +"@smithy/abort-controller@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-2.1.2.tgz#8d865c28ad0d6a39ed0fdf3c361d0e0d722182e3" + integrity sha512-iwUxrFm/ZFCXhzhtZ6JnoJzAsqUrVfBAZUTQj8ypXGtIjwXZpKqmgYiuqrDERiydDI5gesqvsC4Rqe57GGhbVg== + dependencies: + "@smithy/types" "^2.10.0" + tslib "^2.5.0" + "@smithy/chunked-blob-reader-native@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.1.1.tgz#6b98479c8f6ea94832dd6a6e5ca78969a44eafe1" @@ -2803,29 +2811,29 @@ dependencies: tslib "^2.5.0" -"@smithy/config-resolver@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-2.1.1.tgz#fc6b036084b98fd26a8ff01a5d7eb676e41749c7" - integrity sha512-lxfLDpZm+AWAHPFZps5JfDoO9Ux1764fOgvRUBpHIO8HWHcSN1dkgsago1qLRVgm1BZ8RCm8cgv99QvtaOWIhw== +"@smithy/config-resolver@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-2.1.2.tgz#68d8e175ba9b1112d74dbfdccd03dfa38b96c718" + integrity sha512-ZDMY63xJVsJl7ei/yIMv9nx8OiEOulwNnQOUDGpIvzoBrcbvYwiMjIMe5mP5J4fUmttKkpiTKwta/7IUriAn9w== dependencies: - "@smithy/node-config-provider" "^2.2.1" - "@smithy/types" "^2.9.1" + "@smithy/node-config-provider" "^2.2.2" + "@smithy/types" "^2.10.0" "@smithy/util-config-provider" "^2.2.1" - "@smithy/util-middleware" "^2.1.1" + "@smithy/util-middleware" "^2.1.2" tslib "^2.5.0" -"@smithy/core@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@smithy/core/-/core-1.3.2.tgz#e11f3860b69ec0bdbd31e6afaa54963c02dc7f8e" - integrity sha512-tYDmTp0f2TZVE18jAOH1PnmkngLQ+dOGUlMd1u67s87ieueNeyqhja6z/Z4MxhybEiXKOWFOmGjfTZWFxljwJw== - dependencies: - "@smithy/middleware-endpoint" "^2.4.1" - "@smithy/middleware-retry" "^2.1.1" - "@smithy/middleware-serde" "^2.1.1" - "@smithy/protocol-http" "^3.1.1" - "@smithy/smithy-client" "^2.3.1" - "@smithy/types" "^2.9.1" - "@smithy/util-middleware" "^2.1.1" +"@smithy/core@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@smithy/core/-/core-1.3.3.tgz#383da328c514fb916041380196df6fc190a5a996" + integrity sha512-8cT/swERvU1EUMuJF914+psSeVy4+NcNhbRe1WEKN1yIMPE5+Tq5EaPq1HWjKCodcdBIyU9ViTjd62XnebXMHA== + dependencies: + "@smithy/middleware-endpoint" "^2.4.2" + "@smithy/middleware-retry" "^2.1.2" + "@smithy/middleware-serde" "^2.1.2" + "@smithy/protocol-http" "^3.2.0" + "@smithy/smithy-client" "^2.4.0" + "@smithy/types" "^2.10.0" + "@smithy/util-middleware" "^2.1.2" tslib "^2.5.0" "@smithy/credential-provider-imds@^2.2.1": @@ -2839,6 +2847,17 @@ "@smithy/url-parser" "^2.1.1" tslib "^2.5.0" +"@smithy/credential-provider-imds@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-2.2.2.tgz#58d5e38a8c50ae5119e94c0580421ea65789b13b" + integrity sha512-a2xpqWzhzcYwImGbFox5qJLf6i5HKdVeOVj7d6kVFElmbS2QW2T4HmefRc5z1huVArk9bh5Rk1NiFp9YBCXU3g== + dependencies: + "@smithy/node-config-provider" "^2.2.2" + "@smithy/property-provider" "^2.1.2" + "@smithy/types" "^2.10.0" + "@smithy/url-parser" "^2.1.2" + tslib "^2.5.0" + "@smithy/eventstream-codec@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-2.1.1.tgz#4405ab0f9c77d439c575560c4886e59ee17d6d38" @@ -2849,101 +2868,111 @@ "@smithy/util-hex-encoding" "^2.1.1" tslib "^2.5.0" -"@smithy/eventstream-serde-browser@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.1.1.tgz#743a374639e9e2dd858b6fda1fd814eb6c604946" - integrity sha512-JvEdCmGlZUay5VtlT8/kdR6FlvqTDUiJecMjXsBb0+k1H/qc9ME5n2XKPo8q/MZwEIA1GmGgYMokKGjVvMiDow== +"@smithy/eventstream-codec@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-2.1.2.tgz#b527902b7813c5d9d23fb1351b6e84046f2e00df" + integrity sha512-2PHrVRixITHSOj3bxfZmY93apGf8/DFiyhRh9W0ukfi07cvlhlRonZ0fjgcqryJjUZ5vYHqqmfIE/Qe1HM9mlw== dependencies: - "@smithy/eventstream-serde-universal" "^2.1.1" - "@smithy/types" "^2.9.1" + "@aws-crypto/crc32" "3.0.0" + "@smithy/types" "^2.10.0" + "@smithy/util-hex-encoding" "^2.1.1" tslib "^2.5.0" -"@smithy/eventstream-serde-config-resolver@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.1.1.tgz#0b84d6f8be0836af7b92455c69f7427e4f01e7a2" - integrity sha512-EqNqXYp3+dk//NmW3NAgQr9bEQ7fsu/CcxQmTiq07JlaIcne/CBWpMZETyXm9w5LXkhduBsdXdlMscfDUDn2fA== +"@smithy/eventstream-serde-browser@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.1.2.tgz#993f0c92bc0f5fcf734dea1217531f556efe62e6" + integrity sha512-2N11IFHvOmKuwK6hLVkqM8ge8oiQsFkflr4h07LToxo3rX+njkx/5eRn6RVcyNmpbdbxYYt0s0Pf8u+yhHmOKg== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/eventstream-serde-universal" "^2.1.2" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/eventstream-serde-node@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.1.1.tgz#2e1afa27f9c7eb524c1c53621049c5e4e3cea6a5" - integrity sha512-LF882q/aFidFNDX7uROAGxq3H0B7rjyPkV6QDn6/KDQ+CG7AFkRccjxRf1xqajq/Pe4bMGGr+VKAaoF6lELIQw== +"@smithy/eventstream-serde-config-resolver@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.1.2.tgz#6423b5fb1140448286803dae1d444f3bf96d166e" + integrity sha512-nD/+k3mK+lMMwf2AItl7uWma+edHLqiE6LyIYXYnIBlCJcIQnA/vTHjHFoSJFCfG30sBJnU/7u4X5j/mbs9uKg== dependencies: - "@smithy/eventstream-serde-universal" "^2.1.1" - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/eventstream-serde-universal@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.1.1.tgz#0f5eec9ad033017973a67bafb5549782499488d2" - integrity sha512-LR0mMT+XIYTxk4k2fIxEA1BPtW3685QlqufUEUAX1AJcfFfxNDKEvuCRZbO8ntJb10DrIFVJR9vb0MhDCi0sAQ== +"@smithy/eventstream-serde-node@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.1.2.tgz#283adddc9898689cd231a0e6efcdf9bdcec81333" + integrity sha512-zNE6DhbwDEWTKl4mELkrdgXBGC7UsFg1LDkTwizSOFB/gd7G7la083wb0JgU+xPt+TYKK0AuUlOM0rUZSJzqeA== dependencies: - "@smithy/eventstream-codec" "^2.1.1" - "@smithy/types" "^2.9.1" + "@smithy/eventstream-serde-universal" "^2.1.2" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/experimental-identity-and-auth@^0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@smithy/experimental-identity-and-auth/-/experimental-identity-and-auth-0.1.1.tgz#f61340855c5560e2341d87060a2bd2701f5df3fb" - integrity sha512-4cMVvfgEEgZSGwMmEw4bjX0bUqWnGW6FpeCY4OBgxoNU6p9kfdnE+am5qV1Rivl3tmC9yQnHULFHT26QbDckVQ== - dependencies: - "@smithy/middleware-endpoint" "^2.4.1" - "@smithy/middleware-retry" "^2.1.1" - "@smithy/middleware-serde" "^2.1.1" - "@smithy/protocol-http" "^3.1.1" - "@smithy/signature-v4" "^2.1.1" - "@smithy/types" "^2.9.1" - "@smithy/util-middleware" "^2.1.1" +"@smithy/eventstream-serde-universal@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.1.2.tgz#2ecbe6bffc7a40add81dbee04654c943bb602ec7" + integrity sha512-Upd/zy+dNvvIDPU1HGhW9ivNjvJQ0W4UkkQOzr5Mo0hz2lqnZAyOuit4TK2JAEg/oo+V1gUY4XywDc7zNbCF0g== + dependencies: + "@smithy/eventstream-codec" "^2.1.2" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/fetch-http-handler@^2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-2.4.1.tgz#b4d73bbc1449f61234077d58c705b843a8587bf0" - integrity sha512-VYGLinPsFqH68lxfRhjQaSkjXM7JysUOJDTNjHBuN/ykyRb2f1gyavN9+VhhPTWCy32L4yZ2fdhpCs/nStEicg== +"@smithy/experimental-identity-and-auth@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@smithy/experimental-identity-and-auth/-/experimental-identity-and-auth-0.1.2.tgz#accd43738c26ae9faeba57b1270958a2fb32adf0" + integrity sha512-tvqGhvnOybCyPYO6QaL9bamgs8GmjWQIqytNh2Cnr2q1ewORUPjEMLgWVAdwhnP1dB02Zu5yl0pzhOUXaqnkcw== + dependencies: + "@smithy/middleware-endpoint" "^2.4.2" + "@smithy/middleware-retry" "^2.1.2" + "@smithy/middleware-serde" "^2.1.2" + "@smithy/protocol-http" "^3.2.0" + "@smithy/signature-v4" "^2.1.2" + "@smithy/types" "^2.10.0" + "@smithy/util-middleware" "^2.1.2" + tslib "^2.5.0" + +"@smithy/fetch-http-handler@^2.4.2": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-2.4.2.tgz#5ff26c1ef24c6e1d0acd189f6bc064f110fc446f" + integrity sha512-sIGMVwa/8h6eqNjarI3F07gvML3mMXcqBe+BINNLuKsVKXMNBN6wRzeZbbx7lfiJDEHAP28qRns8flHEoBB7zw== dependencies: - "@smithy/protocol-http" "^3.1.1" - "@smithy/querystring-builder" "^2.1.1" - "@smithy/types" "^2.9.1" + "@smithy/protocol-http" "^3.2.0" + "@smithy/querystring-builder" "^2.1.2" + "@smithy/types" "^2.10.0" "@smithy/util-base64" "^2.1.1" tslib "^2.5.0" -"@smithy/hash-blob-browser@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/hash-blob-browser/-/hash-blob-browser-2.1.1.tgz#f4571d4e2fbc2cc1869c443850e5409bf541ba25" - integrity sha512-jizu1+2PAUjiGIfRtlPEU8Yo6zn+d78ti/ZHDesdf1SUn2BuZW433JlPoCOLH3dBoEEvTgLvQ8tUGSoTTALA+A== +"@smithy/hash-blob-browser@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/hash-blob-browser/-/hash-blob-browser-2.1.2.tgz#0e57a302587f9833e45a036479149990f414cedc" + integrity sha512-f8QHgOVSXeYsc4BLKWdfXRowKa2g9byAkAX5c7Ku89bi9uBquWLEVmKlYXFBlkX562Fkmp2YSeciv+zZuOrIOQ== dependencies: "@smithy/chunked-blob-reader" "^2.1.1" "@smithy/chunked-blob-reader-native" "^2.1.1" - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/hash-node@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-2.1.1.tgz#0f8a22d97565ca948724f72267e4d3a2f33740a8" - integrity sha512-Qhoq0N8f2OtCnvUpCf+g1vSyhYQrZjhSwvJ9qvR8BUGOtTXiyv2x1OD2e6jVGmlpC4E4ax1USHoyGfV9JFsACg== +"@smithy/hash-node@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-2.1.2.tgz#3dba95fc89d4758cb6189f2029d846677ac1364e" + integrity sha512-3Sgn4s0g4xud1M/j6hQwYCkz04lVJ24wvCAx4xI26frr3Ao6v0o2VZkBpUySTeQbMUBp2DhuzJ0fV1zybzkckw== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" "@smithy/util-buffer-from" "^2.1.1" "@smithy/util-utf8" "^2.1.1" tslib "^2.5.0" -"@smithy/hash-stream-node@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/hash-stream-node/-/hash-stream-node-2.1.1.tgz#d1885a3bf159872cbb8c9d9f1aefc596ea6cf5db" - integrity sha512-VgDaKcfCy0iHcmtAZgZ3Yw9g37Gkn2JsQiMtFQXUh8Wmo3GfNgDwLOtdhJ272pOT7DStzpe9cNr+eV5Au8KfQA== +"@smithy/hash-stream-node@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/hash-stream-node/-/hash-stream-node-2.1.2.tgz#85f940809bf646e4f7c485c2f23a7b3f04ac0fb3" + integrity sha512-UB6xo+KN3axrLO+MfnWb8mtdeep4vjGUcjYCVFdk9h+OqUb7JYWZZLRcupRPZx28cNBCBEUtc9wVZDI71JDdQA== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" "@smithy/util-utf8" "^2.1.1" tslib "^2.5.0" -"@smithy/invalid-dependency@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-2.1.1.tgz#bd69fa24dd35e9bc65a160bd86becdf1399e4463" - integrity sha512-7WTgnKw+VPg8fxu2v9AlNOQ5yaz6RA54zOVB4f6vQuR0xFKd+RzlCpt0WidYTsye7F+FYDIaS/RnJW4pxjNInw== +"@smithy/invalid-dependency@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-2.1.2.tgz#45c0b34ca9dee56920b9313d88fa5a9e78c7bf41" + integrity sha512-qdgKhkFYxDJnKecx2ANwz3JRkXjm0qDgEnAs5BIfb2z/XqA2l7s9BTH7GTC/RR4E8h6EDCeb5rM2rnARxviqIg== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" tslib "^2.5.0" "@smithy/is-array-buffer@^2.1.1": @@ -2953,91 +2982,91 @@ dependencies: tslib "^2.5.0" -"@smithy/md5-js@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/md5-js/-/md5-js-2.1.1.tgz#f414982bc6ab275b80ec517d2e44a779c374ff9c" - integrity sha512-L3MbIYBIdLlT+MWTYrdVSv/dow1+6iZ1Ad7xS0OHxTTs17d753ZcpOV4Ro7M7tRAVWML/sg2IAp/zzCb6aAttg== +"@smithy/md5-js@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/md5-js/-/md5-js-2.1.2.tgz#205253479128980d3313189dd79d23f63ec757a1" + integrity sha512-C/FWR5ooyDNDfc1Opx3n0QFO5p4G0gldIbk2VU9mPGnZVTjzXcWM5jUQp33My5UK305tKYpG5/kZdQSNVh+tLw== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" "@smithy/util-utf8" "^2.1.1" tslib "^2.5.0" -"@smithy/middleware-apply-body-checksum@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-apply-body-checksum/-/middleware-apply-body-checksum-2.1.1.tgz#c3cbb3bd686cfdfd9ba50f7a3bd9ffea95de86da" - integrity sha512-nvhfdizgRvQv0YO4QHRlLP6GoUdx+gFOk0YwFBgz91yIYFZJsTSs0oS+ySiCP7aNvb57hKjxMdXAOvl6ni1tag== +"@smithy/middleware-apply-body-checksum@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/middleware-apply-body-checksum/-/middleware-apply-body-checksum-2.1.2.tgz#2f777f2049874171cec47e61283a2cd377397dbb" + integrity sha512-8LfWUxTmNz1ygOq3S0su+8KSaGrcB/Enc27XPX64WeUdLCJFEuUxXU9DnmgaZsRB9PrKkr6Z6HfGHmbY24Ypqg== dependencies: "@smithy/is-array-buffer" "^2.1.1" - "@smithy/protocol-http" "^3.1.1" - "@smithy/types" "^2.9.1" + "@smithy/protocol-http" "^3.2.0" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/middleware-compression@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-compression/-/middleware-compression-2.1.1.tgz#34c9f909f0d1a9d6aa8fbed92ca0a02c2a04b9d8" - integrity sha512-eLgIs2Y3YBk/xQPTyzTazhyXdnDlI0+xCBcSHbUNfpE/S0Ofd8pv/952szlJpc5soOvY00+sY3y3ROinLrhpkw== +"@smithy/middleware-compression@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/middleware-compression/-/middleware-compression-2.1.2.tgz#381b19ef8f13c8ee25cd11d3291acf660a7c57e5" + integrity sha512-3uZPE/sA3OEVYEnVmcddn46dPycMs87CLES7bh7WEpKpOm+BP2akoRfD34wHdkx7EUEp+6B0IGc85zSdQLvdRQ== dependencies: "@smithy/is-array-buffer" "^2.1.1" - "@smithy/node-config-provider" "^2.2.1" - "@smithy/protocol-http" "^3.1.1" - "@smithy/types" "^2.9.1" + "@smithy/node-config-provider" "^2.2.2" + "@smithy/protocol-http" "^3.2.0" + "@smithy/types" "^2.10.0" "@smithy/util-config-provider" "^2.2.1" - "@smithy/util-middleware" "^2.1.1" + "@smithy/util-middleware" "^2.1.2" "@smithy/util-utf8" "^2.1.1" fflate "0.8.1" tslib "^2.5.0" -"@smithy/middleware-content-length@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-2.1.1.tgz#df767de12d594bc5622009fb0fc8343522697d8c" - integrity sha512-rSr9ezUl9qMgiJR0UVtVOGEZElMdGFyl8FzWEF5iEKTlcWxGr2wTqGfDwtH3LAB7h+FPkxqv4ZU4cpuCN9Kf/g== +"@smithy/middleware-content-length@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-2.1.2.tgz#c114f955d2b0fd3b61b1068908dd8d87ed070107" + integrity sha512-XEWtul1tHP31EtUIobEyN499paUIbnCTRtjY+ciDCEXW81lZmpjrDG3aL0FxJDPnvatVQuMV1V5eg6MCqTFaLQ== dependencies: - "@smithy/protocol-http" "^3.1.1" - "@smithy/types" "^2.9.1" + "@smithy/protocol-http" "^3.2.0" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/middleware-endpoint@^2.4.1": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-2.4.1.tgz#9e500df4d944741808e92018ccd2e948b598a49f" - integrity sha512-XPZTb1E2Oav60Ven3n2PFx+rX9EDsU/jSTA8VDamt7FXks67ekjPY/XrmmPDQaFJOTUHJNKjd8+kZxVO5Ael4Q== - dependencies: - "@smithy/middleware-serde" "^2.1.1" - "@smithy/node-config-provider" "^2.2.1" - "@smithy/shared-ini-file-loader" "^2.3.1" - "@smithy/types" "^2.9.1" - "@smithy/url-parser" "^2.1.1" - "@smithy/util-middleware" "^2.1.1" +"@smithy/middleware-endpoint@^2.4.2": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-2.4.2.tgz#dc229e8ee59e9f73ffd1ab4e020b2fc25cf2e7fd" + integrity sha512-72qbmVwaWcLOd/OT52fszrrlXywPwciwpsRiIk/dIvpcwkpGE9qrYZ2bt/SYcA/ma8Rz9Ni2AbBuSXLDYISS+A== + dependencies: + "@smithy/middleware-serde" "^2.1.2" + "@smithy/node-config-provider" "^2.2.2" + "@smithy/shared-ini-file-loader" "^2.3.2" + "@smithy/types" "^2.10.0" + "@smithy/url-parser" "^2.1.2" + "@smithy/util-middleware" "^2.1.2" tslib "^2.5.0" -"@smithy/middleware-retry@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-2.1.1.tgz#ddc749dd927f136714f76ca5a52dcfb0993ee162" - integrity sha512-eMIHOBTXro6JZ+WWzZWd/8fS8ht5nS5KDQjzhNMHNRcG5FkNTqcKpYhw7TETMYzbLfhO5FYghHy1vqDWM4FLDA== - dependencies: - "@smithy/node-config-provider" "^2.2.1" - "@smithy/protocol-http" "^3.1.1" - "@smithy/service-error-classification" "^2.1.1" - "@smithy/smithy-client" "^2.3.1" - "@smithy/types" "^2.9.1" - "@smithy/util-middleware" "^2.1.1" - "@smithy/util-retry" "^2.1.1" +"@smithy/middleware-retry@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-2.1.2.tgz#39762d83970b0458db3ad3469349d455ac6af4a4" + integrity sha512-tlvSK+v9bPHHb0dLWvEaFW2Iz0IeA57ISvSaso36I33u8F8wYqo5FCvenH7TgMVBx57jyJBXOmYCZa9n5gdJIg== + dependencies: + "@smithy/node-config-provider" "^2.2.2" + "@smithy/protocol-http" "^3.2.0" + "@smithy/service-error-classification" "^2.1.2" + "@smithy/smithy-client" "^2.4.0" + "@smithy/types" "^2.10.0" + "@smithy/util-middleware" "^2.1.2" + "@smithy/util-retry" "^2.1.2" tslib "^2.5.0" uuid "^8.3.2" -"@smithy/middleware-serde@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-2.1.1.tgz#2c5750f76e276a5249720f6c3c24fac29abbee16" - integrity sha512-D8Gq0aQBeE1pxf3cjWVkRr2W54t+cdM2zx78tNrVhqrDykRA7asq8yVJij1u5NDtKzKqzBSPYh7iW0svUKg76g== +"@smithy/middleware-serde@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-2.1.2.tgz#15b8258b806ecffd0a4c3fec3e56458cdef7ae66" + integrity sha512-XNU6aVIhlSbjuo2XsfZ7rd4HhjTXDlNWxAmhlBfViTW1TNK02CeWdeEntp5XtQKYD//pyTIbYi35EQvIidAkOw== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/middleware-stack@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-2.1.1.tgz#67f992dc36e8a6861f881f80a81c1c30956a0396" - integrity sha512-KPJhRlhsl8CjgGXK/DoDcrFGfAqoqvuwlbxy+uOO4g2Azn1dhH+GVfC3RAp+6PoL5PWPb+vt6Z23FP+Mr6qeCw== +"@smithy/middleware-stack@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-2.1.2.tgz#17dbb56d85f51cb2c86c13dbad7fca35c843c61c" + integrity sha512-EPGaHGd4XmZcaRYjbhyqiqN/Q/ESxXu5e5TK24CTZUe99y8/XCxmiX8VLMM4H0DI7K3yfElR0wPAAvceoSkTgw== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" tslib "^2.5.0" "@smithy/node-config-provider@^2.2.1": @@ -3050,15 +3079,25 @@ "@smithy/types" "^2.9.1" tslib "^2.5.0" -"@smithy/node-http-handler@^2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-2.3.1.tgz#77d23279ff0a12cbe7cde93c5e7c0e86ad56dd20" - integrity sha512-gLA8qK2nL9J0Rk/WEZSvgin4AppvuCYRYg61dcUo/uKxvMZsMInL5I5ZdJTogOvdfVug3N2dgI5ffcUfS4S9PA== +"@smithy/node-config-provider@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-2.2.2.tgz#9422a0764dea8dec4a24f9aa570771d921dc657b" + integrity sha512-QXvpqHSijAm13ZsVkUo92b085UzDvYP1LblWTb3uWi9WilhDvYnVyPLXaryLhOWZ2YvdhK2170T3ZBqtg+quIQ== dependencies: - "@smithy/abort-controller" "^2.1.1" - "@smithy/protocol-http" "^3.1.1" - "@smithy/querystring-builder" "^2.1.1" - "@smithy/types" "^2.9.1" + "@smithy/property-provider" "^2.1.2" + "@smithy/shared-ini-file-loader" "^2.3.2" + "@smithy/types" "^2.10.0" + tslib "^2.5.0" + +"@smithy/node-http-handler@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-2.4.0.tgz#21e48aa56ab334eee8afc69bb05f38f3883c3e95" + integrity sha512-Mf2f7MMy31W8LisJ9O+7J5cKiNwBwBBLU6biQ7/sFSFdhuOxPN7hOPoZ8vlaFjvrpfOUJw9YOpjGyNTKuvomOQ== + dependencies: + "@smithy/abort-controller" "^2.1.2" + "@smithy/protocol-http" "^3.2.0" + "@smithy/querystring-builder" "^2.1.2" + "@smithy/types" "^2.10.0" tslib "^2.5.0" "@smithy/property-provider@^2.1.1": @@ -3069,6 +3108,14 @@ "@smithy/types" "^2.9.1" tslib "^2.5.0" +"@smithy/property-provider@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-2.1.2.tgz#16c630ae0354c05595c99c6ab70a877ee9a180e4" + integrity sha512-yaXCVFKzxbSXqOoyA7AdAgXhwdjiLeui7n2P6XLjBCz/GZFdLUJgSY6KL1PevaxT4REMwUSs/bSHAe/0jdzEHw== + dependencies: + "@smithy/types" "^2.10.0" + tslib "^2.5.0" + "@smithy/protocol-http@^1.1.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-1.2.0.tgz#a554e4dabb14508f0bc2cdef9c3710e2b294be04" @@ -3077,20 +3124,20 @@ "@smithy/types" "^1.2.0" tslib "^2.5.0" -"@smithy/protocol-http@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-3.1.1.tgz#eee522d0ed964a72b735d64925e07bcfb7a7806f" - integrity sha512-6ZRTSsaXuSL9++qEwH851hJjUA0OgXdQFCs+VDw4tGH256jQ3TjYY/i34N4vd24RV3nrjNsgd1yhb57uMoKbzQ== +"@smithy/protocol-http@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-3.2.0.tgz#1b9ed9eb18cd256e0d7872ec2851f5d12ba37d87" + integrity sha512-VRp0YITYIQum+rX4zeZ3cW1wl9r90IQzQN+VLS1NxdSMt6NLsJiJqR9czTxlaeWNrLHsFAETmjmdrS48Ug1liA== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/querystring-builder@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-2.1.1.tgz#b9693448ad3f8e0767d84cf5cae29f35514591fb" - integrity sha512-C/ko/CeEa8jdYE4gt6nHO5XDrlSJ3vdCG0ZAc6nD5ZIE7LBp0jCx4qoqp7eoutBu7VrGMXERSRoPqwi1WjCPbg== +"@smithy/querystring-builder@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-2.1.2.tgz#78f028c25253e514915247b25c20b3cf0d6a035b" + integrity sha512-wk6QpuvBBLJF5w8aADsZOtxaHY9cF5MZe1Ry3hSqqBxARdUrMoXi/jukUz5W0ftXGlbA398IN8dIIUj3WXqJXg== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" "@smithy/util-uri-escape" "^2.1.1" tslib "^2.5.0" @@ -3102,6 +3149,14 @@ "@smithy/types" "^2.9.1" tslib "^2.5.0" +"@smithy/querystring-parser@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-2.1.2.tgz#3883dfec5760f0f8cdf9acc837bdc631069df576" + integrity sha512-z1yL5Iiagm/UxVy1tcuTFZdfOBK/QtYeK6wfClAJ7cOY7kIaYR6jn1cVXXJmhAQSh1b2ljP4xiZN4Ybj7Tbs5w== + dependencies: + "@smithy/types" "^2.10.0" + tslib "^2.5.0" + "@smithy/service-client-documentation-generator@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@smithy/service-client-documentation-generator/-/service-client-documentation-generator-2.1.1.tgz#0780b3e7ecda71b2efeced4e5acb9c5054322deb" @@ -3109,12 +3164,12 @@ dependencies: tslib "^2.5.0" -"@smithy/service-error-classification@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-2.1.1.tgz#dd24e1ec529ae9ec8e87d8b15f0fc8f7e17f3d02" - integrity sha512-txEdZxPUgM1PwGvDvHzqhXisrc5LlRWYCf2yyHfvITWioAKat7srQvpjMAvgzf0t6t7j8yHrryXU9xt7RZqFpw== +"@smithy/service-error-classification@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-2.1.2.tgz#b8b5c23a784bcb1eb229a921d7040575e29e38ed" + integrity sha512-R+gL1pAPuWkH6unFridk57wDH5PFY2IlVg2NUjSAjoaIaU+sxqKf/7AOWIcx9Bdn+xY0/4IRQ69urlC+F3I9gg== dependencies: - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" "@smithy/shared-ini-file-loader@^2.3.1": version "2.3.1" @@ -3124,6 +3179,14 @@ "@smithy/types" "^2.9.1" tslib "^2.5.0" +"@smithy/shared-ini-file-loader@^2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.3.2.tgz#3e4943b534eaabda15372e611cdb428dfdd88362" + integrity sha512-idHGDJB+gBh+aaIjmWj6agmtNWftoyAenErky74hAtKyUaCvfocSBgEJ2pQ6o68svBluvGIj4NGFgJu0198mow== + dependencies: + "@smithy/types" "^2.10.0" + tslib "^2.5.0" + "@smithy/signature-v4@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-2.1.1.tgz#6080171e3d694f40d3f553bbc236c5c433efd4d2" @@ -3138,16 +3201,30 @@ "@smithy/util-utf8" "^2.1.1" tslib "^2.5.0" -"@smithy/smithy-client@^2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-2.3.1.tgz#0c3a4a0d3935c7ad2240cc23181f276705212b1f" - integrity sha512-YsTdU8xVD64r2pLEwmltrNvZV6XIAC50LN6ivDopdt+YiF/jGH6PY9zUOu0CXD/d8GMB8gbhnpPsdrjAXHS9QA== +"@smithy/signature-v4@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-2.1.2.tgz#a658df8a5fcb57160e1c364d43b46e0d14f5995f" + integrity sha512-DdPWaNGIbxzyocR3ncH8xlxQgsqteRADEdCPoivgBzwv17UzKy2obtdi2vwNc5lAJ955bGEkkWef9O7kc1Eocg== dependencies: - "@smithy/middleware-endpoint" "^2.4.1" - "@smithy/middleware-stack" "^2.1.1" - "@smithy/protocol-http" "^3.1.1" - "@smithy/types" "^2.9.1" - "@smithy/util-stream" "^2.1.1" + "@smithy/eventstream-codec" "^2.1.2" + "@smithy/is-array-buffer" "^2.1.1" + "@smithy/types" "^2.10.0" + "@smithy/util-hex-encoding" "^2.1.1" + "@smithy/util-middleware" "^2.1.2" + "@smithy/util-uri-escape" "^2.1.1" + "@smithy/util-utf8" "^2.1.1" + tslib "^2.5.0" + +"@smithy/smithy-client@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-2.4.0.tgz#f4cef6f63cdc267a32ded8446ca3db0ebb8fe64d" + integrity sha512-6/jxk0om9l2s9BcgHtrBn+Hd3xcFGDzxfEJ2FvGpZxIz0S7bgvZg1gyR66O1xf1w9WZBH+W7JClhfSn2gETINw== + dependencies: + "@smithy/middleware-endpoint" "^2.4.2" + "@smithy/middleware-stack" "^2.1.2" + "@smithy/protocol-http" "^3.2.0" + "@smithy/types" "^2.10.0" + "@smithy/util-stream" "^2.1.2" tslib "^2.5.0" "@smithy/types@^1.2.0": @@ -3157,6 +3234,13 @@ dependencies: tslib "^2.5.0" +"@smithy/types@^2.10.0": + version "2.10.0" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.10.0.tgz#1cc16e3c04d56c49ecb88efa1b7fa9ca3a90d667" + integrity sha512-QYXQmpIebS8/jYXgyJjCanKZbI4Rr8tBVGBAIdDhA35f025TVjJNW69FJ0TGiDqt+lIGo037YIswq2t2Y1AYZQ== + dependencies: + tslib "^2.5.0" + "@smithy/types@^2.9.1": version "2.9.1" resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.9.1.tgz#ed04d4144eed3b8bd26d20fc85aae8d6e357ebb9" @@ -3173,6 +3257,15 @@ "@smithy/types" "^2.9.1" tslib "^2.5.0" +"@smithy/url-parser@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-2.1.2.tgz#915590d97a7c6beb0dcebc9e9458345cf6bf7f48" + integrity sha512-KBPi740ciTujUaY+RfQuPABD0QFmgSBN5qNVDCGTryfsbG4jkwC0YnElSzi72m24HegMyxzZDLG4Oh4/97mw2g== + dependencies: + "@smithy/querystring-parser" "^2.1.2" + "@smithy/types" "^2.10.0" + tslib "^2.5.0" + "@smithy/util-base64@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@smithy/util-base64/-/util-base64-2.1.1.tgz#af729085cc9d92ebd54a5d2c5d0aa5a0c31f83bf" @@ -3210,37 +3303,37 @@ dependencies: tslib "^2.5.0" -"@smithy/util-defaults-mode-browser@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.1.1.tgz#be9ac82acee6ec4821b610e7187b0e147f0ba8ff" - integrity sha512-lqLz/9aWRO6mosnXkArtRuQqqZBhNpgI65YDpww4rVQBuUT7qzKbDLG5AmnQTCiU4rOquaZO/Kt0J7q9Uic7MA== +"@smithy/util-defaults-mode-browser@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.1.2.tgz#5f4c328605635656dee624a1686c7616aadccf4d" + integrity sha512-YmojdmsE7VbvFGJ/8btn/5etLm1HOQkgVX6nMWlB0yBL/Vb//s3aTebUJ66zj2+LNrBS3B9S+18+LQU72Yj0AQ== dependencies: - "@smithy/property-provider" "^2.1.1" - "@smithy/smithy-client" "^2.3.1" - "@smithy/types" "^2.9.1" + "@smithy/property-provider" "^2.1.2" + "@smithy/smithy-client" "^2.4.0" + "@smithy/types" "^2.10.0" bowser "^2.11.0" tslib "^2.5.0" -"@smithy/util-defaults-mode-node@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.2.0.tgz#72fd6f945c265f1ef9be647fe829d55df5101390" - integrity sha512-iFJp/N4EtkanFpBUtSrrIbtOIBf69KNuve03ic1afhJ9/korDxdM0c6cCH4Ehj/smI9pDCfVv+bqT3xZjF2WaA== - dependencies: - "@smithy/config-resolver" "^2.1.1" - "@smithy/credential-provider-imds" "^2.2.1" - "@smithy/node-config-provider" "^2.2.1" - "@smithy/property-provider" "^2.1.1" - "@smithy/smithy-client" "^2.3.1" - "@smithy/types" "^2.9.1" +"@smithy/util-defaults-mode-node@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.2.1.tgz#034918f2f945974e7414c092cb250f2d45fe0ceb" + integrity sha512-kof7M9Q2qP5yaQn8hHJL3KwozyvIfLe+ys7feifSul6gBAAeoraibo/MWqotb/I0fVLMlCMDwn7WXFsGUwnsew== + dependencies: + "@smithy/config-resolver" "^2.1.2" + "@smithy/credential-provider-imds" "^2.2.2" + "@smithy/node-config-provider" "^2.2.2" + "@smithy/property-provider" "^2.1.2" + "@smithy/smithy-client" "^2.4.0" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/util-endpoints@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-1.1.1.tgz#45426dba6fb42282a0ad955600b2b3ba050d118f" - integrity sha512-sI4d9rjoaekSGEtq3xSb2nMjHMx8QXcz2cexnVyRWsy4yQ9z3kbDpX+7fN0jnbdOp0b3KSTZJZ2Yb92JWSanLw== +"@smithy/util-endpoints@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-1.1.2.tgz#92f743ac8c2c3a99b1558a1c956864b565aa23e7" + integrity sha512-2/REfdcJ20y9iF+9kSBRBsaoGzjT5dZ3E6/TA45GHJuJAb/vZTj76VLTcrl2iN3fWXiDK1B8RxchaLGbr7RxxA== dependencies: - "@smithy/node-config-provider" "^2.2.1" - "@smithy/types" "^2.9.1" + "@smithy/node-config-provider" "^2.2.2" + "@smithy/types" "^2.10.0" tslib "^2.5.0" "@smithy/util-hex-encoding@^2.1.1": @@ -3258,23 +3351,31 @@ "@smithy/types" "^2.9.1" tslib "^2.5.0" -"@smithy/util-retry@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-2.1.1.tgz#f2d3566b6e5b841028c7240c852007d4037e49b2" - integrity sha512-Mg+xxWPTeSPrthpC5WAamJ6PW4Kbo01Fm7lWM1jmGRvmrRdsd3192Gz2fBXAMURyXpaNxyZf6Hr/nQ4q70oVEA== +"@smithy/util-middleware@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-2.1.2.tgz#5e2e13c96e95b65ae5980a658e1b10e222a42482" + integrity sha512-lvSOnwQ7iAajtWb1nAyy0CkOIn8d+jGykQOtt2NXDsPzOTfejZM/Uph+O/TmVgWoXdcGuw5peUMG2f5xEIl6UQ== dependencies: - "@smithy/service-error-classification" "^2.1.1" - "@smithy/types" "^2.9.1" + "@smithy/types" "^2.10.0" tslib "^2.5.0" -"@smithy/util-stream@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-2.1.1.tgz#3ae0e88c3a1a45899e29c1655d2e5a3865b6c0a6" - integrity sha512-J7SMIpUYvU4DQN55KmBtvaMc7NM3CZ2iWICdcgaovtLzseVhAqFRYqloT3mh0esrFw+3VEK6nQFteFsTqZSECQ== +"@smithy/util-retry@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-2.1.2.tgz#4b7d3ac79ad9a3b3cb01d21d8fe5ea0b99390b90" + integrity sha512-pqifOgRqwLfRu+ks3awEKKqPeYxrHLwo4Yu2EarGzeoarTd1LVEyyf5qLE6M7IiCsxnXRhn9FoWIdZOC+oC/VQ== dependencies: - "@smithy/fetch-http-handler" "^2.4.1" - "@smithy/node-http-handler" "^2.3.1" - "@smithy/types" "^2.9.1" + "@smithy/service-error-classification" "^2.1.2" + "@smithy/types" "^2.10.0" + tslib "^2.5.0" + +"@smithy/util-stream@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-2.1.2.tgz#c1ab318fa2f14ef044bdec7cb93a9ffc36388f85" + integrity sha512-AbGjvoSok7YeUKv9WRVRSChQfsufLR54YCAabTbaABRdIucywRQs29em0uAP6r4RLj+4aFZStWGYpFgT0P8UlQ== + dependencies: + "@smithy/fetch-http-handler" "^2.4.2" + "@smithy/node-http-handler" "^2.4.0" + "@smithy/types" "^2.10.0" "@smithy/util-base64" "^2.1.1" "@smithy/util-buffer-from" "^2.1.1" "@smithy/util-hex-encoding" "^2.1.1" @@ -3296,13 +3397,13 @@ "@smithy/util-buffer-from" "^2.1.1" tslib "^2.5.0" -"@smithy/util-waiter@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-2.1.1.tgz#292d4d09cda7df38aba6ea2abd7d948e3f11bf2d" - integrity sha512-kYy6BLJJNif+uqNENtJqWdXcpqo1LS+nj1AfXcDhOpqpSHJSAkVySLyZV9fkmuVO21lzGoxjvd1imGGJHph/IA== +"@smithy/util-waiter@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-2.1.2.tgz#194f8cbd9c8c7c6e03d57c22eb057fb6f30e0b44" + integrity sha512-yxLC57GBDmbDmrnH+vJxsrbV4/aYUucBONkSRLZyJIVFAl/QJH+O/h+phITHDaxVZCYZAcudYJw4ERE32BJM7g== dependencies: - "@smithy/abort-controller" "^2.1.1" - "@smithy/types" "^2.9.1" + "@smithy/abort-controller" "^2.1.2" + "@smithy/types" "^2.10.0" tslib "^2.5.0" "@socket.io/component-emitter@~3.1.0":