@openclaw/amazon-bedrock-provider 2026.10.2 → 2026.10.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bedrock-options.js +0 -1
- package/dist/discovery.js +57 -128
- package/dist/embedding-provider.js +3 -13
- package/dist/memory-embedding-adapter.js +0 -5
- package/dist/provider-policy-api.js +0 -1
- package/dist/register.sync.runtime.js +3 -27
- package/dist/stream.runtime.js +27 -28
- package/dist/thinking-policy.js +0 -5
- package/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock/dist-es/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock/dist-types/Bedrock.d.ts +223 -217
- package/node_modules/@aws-sdk/client-bedrock/dist-types/ts3.4/Bedrock.d.ts +220 -216
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/package.json +6 -6
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +14 -11
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +13 -10
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +11 -5
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +11 -5
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STS.d.ts +33 -8
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +22 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/index.d.ts +22 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/models_0.d.ts +40 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentity.d.ts +14 -5
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/Signin.d.ts +11 -5
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/STS.d.ts +11 -5
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/models_0.d.ts +6 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +1 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +1 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/CHANGELOG.md +19 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +22 -37
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +48 -4
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +49 -8
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +15 -7
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +22 -22
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +0 -15
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/client/index.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +8 -1
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +40 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +49 -8
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +15 -7
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/submodules/client/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +17 -7
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +21 -7
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/signature-v4/CHANGELOG.md +6 -0
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/signature-v4/dist-cjs/index.js +4 -1
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +4 -1
- package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/signature-v4/package.json +3 -3
- package/node_modules/@aws-sdk/client-bedrock/package.json +9 -9
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/BedrockRuntime.d.ts +29 -23
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/ts3.4/BedrockRuntime.d.ts +26 -22
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/package.json +6 -6
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/middleware-websocket/package.json +7 -7
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +14 -11
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +13 -10
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +11 -5
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +11 -5
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STS.d.ts +33 -8
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +22 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/index.d.ts +22 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/models_0.d.ts +40 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentity.d.ts +14 -5
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/Signin.d.ts +11 -5
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/STS.d.ts +11 -5
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/models_0.d.ts +6 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/CHANGELOG.md +19 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +22 -37
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +48 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +49 -8
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +15 -7
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +22 -22
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +0 -15
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/client/index.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +8 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +40 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +49 -8
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +15 -7
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/submodules/client/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +17 -7
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +21 -7
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/signature-v4/CHANGELOG.md +6 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/signature-v4/dist-cjs/index.js +4 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +4 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/signature-v4/package.json +3 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +14 -11
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +13 -10
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +11 -5
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +11 -5
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STS.d.ts +33 -8
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +22 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/index.d.ts +22 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/models_0.d.ts +40 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentity.d.ts +14 -5
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/Signin.d.ts +11 -5
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/STS.d.ts +11 -5
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/models_0.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/CHANGELOG.md +19 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +22 -37
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +48 -4
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +49 -8
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +15 -7
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +22 -22
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +0 -15
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/client/index.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +8 -1
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +40 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +49 -8
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +15 -7
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/submodules/client/index.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +17 -7
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +21 -7
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/signature-v4/CHANGELOG.md +6 -0
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/signature-v4/dist-cjs/index.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/signature-v4/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/CHANGELOG.md +19 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +22 -37
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +48 -4
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +49 -8
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +15 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +22 -22
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +0 -15
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/client/index.js +1 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +8 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +40 -3
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +49 -8
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +15 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/submodules/client/index.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +17 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +21 -7
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/types/CHANGELOG.md +6 -0
- package/node_modules/@smithy/types/dist-types/metrics.d.ts +8 -7
- package/node_modules/@smithy/types/dist-types/middleware.d.ts +5 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +8 -7
- package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +5 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/package.json +8 -8
|
@@ -7,12 +7,12 @@ export class TypeRegistry {
|
|
|
7
7
|
this.namespace = namespace;
|
|
8
8
|
this.schemas = schemas;
|
|
9
9
|
this.exceptions = exceptions;
|
|
10
|
-
}
|
|
11
|
-
static for(namespace) {
|
|
12
10
|
if (!TypeRegistry.registries.has(namespace)) {
|
|
13
|
-
TypeRegistry.registries.set(namespace,
|
|
11
|
+
TypeRegistry.registries.set(namespace, this);
|
|
14
12
|
}
|
|
15
|
-
|
|
13
|
+
}
|
|
14
|
+
static for(namespace) {
|
|
15
|
+
return TypeRegistry.registries.get(namespace) ?? new TypeRegistry(namespace);
|
|
16
16
|
}
|
|
17
17
|
copyFrom(other) {
|
|
18
18
|
const { schemas, exceptions } = this;
|
|
@@ -30,7 +30,9 @@ export class TypeRegistry {
|
|
|
30
30
|
register(shapeId, schema) {
|
|
31
31
|
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
32
32
|
for (const r of [this, TypeRegistry.for(qualifiedName.split("#")[0])]) {
|
|
33
|
-
r.schemas.
|
|
33
|
+
if (!r.schemas.has(qualifiedName)) {
|
|
34
|
+
r.schemas.set(qualifiedName, schema);
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
getSchema(shapeId) {
|
|
@@ -55,9 +57,15 @@ export class TypeRegistry {
|
|
|
55
57
|
registerError(es, ctor) {
|
|
56
58
|
const $error = es;
|
|
57
59
|
const ns = $error[1];
|
|
60
|
+
const qualifiedName = ns + "#" + $error[2];
|
|
61
|
+
if (!ctor.hasOwnProperty?.("shapeId")) {
|
|
62
|
+
ctor.shapeId = qualifiedName;
|
|
63
|
+
}
|
|
58
64
|
for (const r of [this, TypeRegistry.for(ns)]) {
|
|
59
|
-
r.schemas.
|
|
60
|
-
|
|
65
|
+
if (!r.schemas.has(qualifiedName) && !r.exceptions.has($error)) {
|
|
66
|
+
r.schemas.set(qualifiedName, $error);
|
|
67
|
+
r.exceptions.set($error, ctor);
|
|
68
|
+
}
|
|
61
69
|
}
|
|
62
70
|
}
|
|
63
71
|
getErrorCtor(es) {
|
|
@@ -18,6 +18,9 @@ export declare const dateToTag: (date: Date) => {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const parseCborErrorBody: (errorBody: any, context: SerdeContext) => Promise<any>;
|
|
20
20
|
/**
|
|
21
|
+
* Trims error.__type
|
|
22
|
+
* "com.a.b#Error:Sender,tag" -> "com.a.b#Error"
|
|
23
|
+
*
|
|
21
24
|
* @internal
|
|
22
25
|
*/
|
|
23
26
|
export declare const loadSmithyRpcV2CborErrorCode: (output: HttpResponse, data: any) => string | undefined;
|
|
@@ -5,7 +5,7 @@ export { invalidFunction } from "./invalid-dependency/invalidFunction";
|
|
|
5
5
|
export { invalidProvider } from "./invalid-dependency/invalidProvider";
|
|
6
6
|
export { createWaiter } from "./util-waiter/createWaiter";
|
|
7
7
|
export { waiterServiceDefaults, WaiterState, checkExceptions, type WaiterConfiguration, type WaiterOptions, type WaiterResult, } from "./util-waiter/waiter";
|
|
8
|
-
export { Client, type SmithyConfiguration, type SmithyResolvedConfiguration } from "./smithy-client/client";
|
|
8
|
+
export { Client, type SmithyClientRequestOptions, type SmithyConfiguration, type SmithyResolvedConfiguration, } from "./smithy-client/client";
|
|
9
9
|
export { Command, type CommandImpl } from "./smithy-client/command";
|
|
10
10
|
export { SENSITIVE_STRING } from "./smithy-client/constants";
|
|
11
11
|
export { createAggregatedClient } from "./smithy-client/create-aggregated-client";
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import type { $ClientProtocol, $ClientProtocolCtor, ClientProtocol, ClientProtocolCtor, Command, FetchHttpHandlerOptions, Client as IClient, MetadataBearer, MiddlewareStack, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types";
|
|
1
|
+
import type { $ClientProtocol, $ClientProtocolCtor, ClientProtocol, ClientProtocolCtor, Command, FetchHttpHandlerOptions, Client as IClient, MetadataBearer, MetricsRecorder, MiddlewareStack, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* Options accepted for an individual Smithy client request.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type SmithyClientRequestOptions<HandlerOptions> = unknown extends HandlerOptions ? HandlerOptions : HandlerOptions extends unknown ? keyof HandlerOptions extends never ? HandlerOptions : HandlerOptions & {
|
|
8
|
+
metricsRecorder?: MetricsRecorder<unknown>;
|
|
9
|
+
} : never;
|
|
2
10
|
/**
|
|
3
11
|
* @public
|
|
4
12
|
*/
|
|
@@ -77,8 +85,8 @@ export declare class Client<HandlerOptions, ClientInput extends object, ClientOu
|
|
|
77
85
|
*/
|
|
78
86
|
private handlers?;
|
|
79
87
|
constructor(config: ResolvedClientConfiguration);
|
|
80
|
-
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options?: HandlerOptions): Promise<OutputType>;
|
|
88
|
+
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options?: SmithyClientRequestOptions<HandlerOptions>): Promise<OutputType>;
|
|
81
89
|
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, cb: (err: any, data?: OutputType) => void): void;
|
|
82
|
-
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options: HandlerOptions
|
|
90
|
+
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options: SmithyClientRequestOptions<HandlerOptions>, cb: (err: any, data?: OutputType) => void): void;
|
|
83
91
|
destroy(): void;
|
|
84
92
|
}
|
|
@@ -18,6 +18,7 @@ export interface ServiceExceptionOptions extends SmithyException, MetadataBearer
|
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
20
|
export declare class ServiceException extends Error implements SmithyException, MetadataBearer {
|
|
21
|
+
static readonly shapeId: string;
|
|
21
22
|
readonly $fault: "client" | "server";
|
|
22
23
|
$response?: HttpResponse;
|
|
23
24
|
$retryable?: RetryableTrait;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EventStreamSerde } from "@smithy/core/event-streams";
|
|
2
2
|
import { NormalizedSchema, TypeRegistry } from "@smithy/core/schema";
|
|
3
|
-
import type { ClientProtocol, Codec, Endpoint, EndpointBearer, EndpointV2, EventStreamMarshaller, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
3
|
+
import type { ClientProtocol, Codec, Endpoint, EndpointBearer, EndpointV2, EventStreamMarshaller, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer, StaticErrorSchema } from "@smithy/types";
|
|
4
4
|
import { SerdeContext } from "./SerdeContext";
|
|
5
5
|
/**
|
|
6
6
|
* Abstract base for HTTP-based client protocols.
|
|
@@ -43,6 +43,16 @@ export declare abstract class HttpProtocol extends SerdeContext implements Clien
|
|
|
43
43
|
protected setHostPrefix<Input extends object>(request: IHttpRequest, operationSchema: OperationSchema, input: Input): void;
|
|
44
44
|
protected abstract handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
|
|
45
45
|
protected deserializeMetadata(output: IHttpResponse): ResponseMetadata;
|
|
46
|
+
/**
|
|
47
|
+
* For a given error short name, a list of preferred namespaces, and a list of preferred registries,
|
|
48
|
+
* find the error's schema and class.
|
|
49
|
+
*
|
|
50
|
+
* @param name - short error shape id.
|
|
51
|
+
* @param namespaces - must contain '*' to allow matching against an undeclared namespace.
|
|
52
|
+
* @param registries - in which to look.
|
|
53
|
+
* @returns matched error schema and constructor, with worst case being the least-descriptive DocumentSchema and native Error.
|
|
54
|
+
*/
|
|
55
|
+
protected resolveError(name: string, namespaces: string[], registries: TypeRegistry[]): [StaticErrorSchema, any, "modeled" | "synthetic" | "native"];
|
|
46
56
|
/**
|
|
47
57
|
* @param eventStream - the iterable provided by the caller.
|
|
48
58
|
* @param requestSchema - the schema of the event stream container (struct).
|
|
@@ -74,12 +84,6 @@ export declare abstract class HttpProtocol extends SerdeContext implements Clien
|
|
|
74
84
|
* Loads eventStream capability async (for chunking).
|
|
75
85
|
*/
|
|
76
86
|
protected loadEventStreamCapability(): Promise<EventStreamSerde>;
|
|
77
|
-
/**
|
|
78
|
-
* Returns a platform-specific EventStreamMarshaller.
|
|
79
|
-
* Prefers user-injected marshaller from serdeContext (via client config),
|
|
80
|
-
* falls back to the dynamically imported provider.
|
|
81
|
-
*/
|
|
82
|
-
private resolveEventStreamMarshaller;
|
|
83
87
|
/**
|
|
84
88
|
* @returns content-type default header value for event stream events and other documents.
|
|
85
89
|
*/
|
|
@@ -92,4 +96,10 @@ export declare abstract class HttpProtocol extends SerdeContext implements Clien
|
|
|
92
96
|
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, headerBindings: Set<string>, dataObject: any): Promise<string[]>;
|
|
93
97
|
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any): Promise<string[]>;
|
|
94
98
|
protected getEventStreamMarshaller(): EventStreamMarshaller;
|
|
99
|
+
/**
|
|
100
|
+
* Returns a platform-specific EventStreamMarshaller.
|
|
101
|
+
* Prefers user-injected marshaller from serdeContext (via client config),
|
|
102
|
+
* falls back to the dynamically imported provider.
|
|
103
|
+
*/
|
|
104
|
+
private resolveEventStreamMarshaller;
|
|
95
105
|
}
|
|
@@ -10,10 +10,10 @@ export declare class TypeRegistry {
|
|
|
10
10
|
private schemas;
|
|
11
11
|
private exceptions;
|
|
12
12
|
static readonly registries: Map<string, TypeRegistry>;
|
|
13
|
-
|
|
13
|
+
constructor(namespace: string, schemas?: Map<string, ISchema>, exceptions?: Map<StaticErrorSchema, any>);
|
|
14
14
|
/**
|
|
15
15
|
* @param namespace - specifier.
|
|
16
|
-
* @returns the
|
|
16
|
+
* @returns the TypeRegistry for that namespace, creating it if necessary.
|
|
17
17
|
*/
|
|
18
18
|
static for(namespace: string): TypeRegistry;
|
|
19
19
|
/**
|
|
@@ -18,6 +18,9 @@ export declare const dateToTag: (date: Date) => {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const parseCborErrorBody: (errorBody: any, context: SerdeContext) => Promise<any>;
|
|
20
20
|
/**
|
|
21
|
+
* Trims error.__type
|
|
22
|
+
* "com.a.b#Error:Sender,tag" -> "com.a.b#Error"
|
|
23
|
+
*
|
|
21
24
|
* @internal
|
|
22
25
|
*/
|
|
23
26
|
export declare const loadSmithyRpcV2CborErrorCode: (output: HttpResponse, data: any) => string | undefined;
|
|
@@ -5,7 +5,7 @@ export { invalidFunction } from "./invalid-dependency/invalidFunction";
|
|
|
5
5
|
export { invalidProvider } from "./invalid-dependency/invalidProvider";
|
|
6
6
|
export { createWaiter } from "./util-waiter/createWaiter";
|
|
7
7
|
export { waiterServiceDefaults, WaiterState, checkExceptions, WaiterConfiguration, WaiterOptions, WaiterResult } from "./util-waiter/waiter";
|
|
8
|
-
export { Client, SmithyConfiguration, SmithyResolvedConfiguration } from "./smithy-client/client";
|
|
8
|
+
export { Client, SmithyClientRequestOptions, SmithyConfiguration, SmithyResolvedConfiguration } from "./smithy-client/client";
|
|
9
9
|
export { Command, CommandImpl } from "./smithy-client/command";
|
|
10
10
|
export { SENSITIVE_STRING } from "./smithy-client/constants";
|
|
11
11
|
export { createAggregatedClient } from "./smithy-client/create-aggregated-client";
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { $ClientProtocol, $ClientProtocolCtor, ClientProtocol, ClientProtocolCtor, Command, FetchHttpHandlerOptions, Client as IClient, MetadataBearer, MiddlewareStack, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types";
|
|
1
|
+
import { $ClientProtocol, $ClientProtocolCtor, ClientProtocol, ClientProtocolCtor, Command, FetchHttpHandlerOptions, Client as IClient, MetadataBearer, MetricsRecorder, MiddlewareStack, NodeHttpHandlerOptions, RequestHandler } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* Options accepted for an individual Smithy client request.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type SmithyClientRequestOptions<HandlerOptions> = unknown extends HandlerOptions ? HandlerOptions : HandlerOptions extends unknown ? keyof HandlerOptions extends never ? HandlerOptions : HandlerOptions & {
|
|
8
|
+
metricsRecorder?: MetricsRecorder<unknown>;
|
|
9
|
+
} : never;
|
|
2
10
|
/**
|
|
3
11
|
* @public
|
|
4
12
|
*/
|
|
@@ -77,8 +85,8 @@ export declare class Client<HandlerOptions, ClientInput extends object, ClientOu
|
|
|
77
85
|
*/
|
|
78
86
|
private handlers?;
|
|
79
87
|
constructor(config: ResolvedClientConfiguration);
|
|
80
|
-
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options?: HandlerOptions): Promise<OutputType>;
|
|
88
|
+
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options?: SmithyClientRequestOptions<HandlerOptions>): Promise<OutputType>;
|
|
81
89
|
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, cb: (err: any, data?: OutputType) => void): void;
|
|
82
|
-
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options: HandlerOptions
|
|
90
|
+
send<InputType extends ClientInput, OutputType extends ClientOutput>(command: Command<ClientInput, InputType, ClientOutput, OutputType, SmithyResolvedConfiguration<HandlerOptions>>, options: SmithyClientRequestOptions<HandlerOptions>, cb: (err: any, data?: OutputType) => void): void;
|
|
83
91
|
destroy(): void;
|
|
84
92
|
}
|
|
@@ -18,6 +18,7 @@ export interface ServiceExceptionOptions extends SmithyException, MetadataBearer
|
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
20
|
export declare class ServiceException extends Error implements SmithyException, MetadataBearer {
|
|
21
|
+
static readonly shapeId: string;
|
|
21
22
|
readonly $fault: "client" | "server";
|
|
22
23
|
$response?: HttpResponse;
|
|
23
24
|
$retryable?: RetryableTrait;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventStreamSerde } from "@smithy/core/event-streams";
|
|
2
2
|
import { NormalizedSchema, TypeRegistry } from "@smithy/core/schema";
|
|
3
|
-
import { ClientProtocol, Codec, Endpoint, EndpointBearer, EndpointV2, EventStreamMarshaller, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
3
|
+
import { ClientProtocol, Codec, Endpoint, EndpointBearer, EndpointV2, EventStreamMarshaller, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer, StaticErrorSchema } from "@smithy/types";
|
|
4
4
|
import { SerdeContext } from "./SerdeContext";
|
|
5
5
|
/**
|
|
6
6
|
* Abstract base for HTTP-based client protocols.
|
|
@@ -43,6 +43,20 @@ export declare abstract class HttpProtocol extends SerdeContext implements Clien
|
|
|
43
43
|
protected setHostPrefix<Input extends object>(request: IHttpRequest, operationSchema: OperationSchema, input: Input): void;
|
|
44
44
|
protected abstract handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
|
|
45
45
|
protected deserializeMetadata(output: IHttpResponse): ResponseMetadata;
|
|
46
|
+
/**
|
|
47
|
+
* For a given error short name, a list of preferred namespaces, and a list of preferred registries,
|
|
48
|
+
* find the error's schema and class.
|
|
49
|
+
*
|
|
50
|
+
* @param name - short error shape id.
|
|
51
|
+
* @param namespaces - must contain '*' to allow matching against an undeclared namespace.
|
|
52
|
+
* @param registries - in which to look.
|
|
53
|
+
* @returns matched error schema and constructor, with worst case being the least-descriptive DocumentSchema and native Error.
|
|
54
|
+
*/
|
|
55
|
+
protected resolveError(name: string, namespaces: string[], registries: TypeRegistry[]): [
|
|
56
|
+
StaticErrorSchema,
|
|
57
|
+
any,
|
|
58
|
+
"modeled" | "synthetic" | "native"
|
|
59
|
+
];
|
|
46
60
|
/**
|
|
47
61
|
* @param eventStream - the iterable provided by the caller.
|
|
48
62
|
* @param requestSchema - the schema of the event stream container (struct).
|
|
@@ -74,12 +88,6 @@ export declare abstract class HttpProtocol extends SerdeContext implements Clien
|
|
|
74
88
|
* Loads eventStream capability async (for chunking).
|
|
75
89
|
*/
|
|
76
90
|
protected loadEventStreamCapability(): Promise<EventStreamSerde>;
|
|
77
|
-
/**
|
|
78
|
-
* Returns a platform-specific EventStreamMarshaller.
|
|
79
|
-
* Prefers user-injected marshaller from serdeContext (via client config),
|
|
80
|
-
* falls back to the dynamically imported provider.
|
|
81
|
-
*/
|
|
82
|
-
private resolveEventStreamMarshaller;
|
|
83
91
|
/**
|
|
84
92
|
* @returns content-type default header value for event stream events and other documents.
|
|
85
93
|
*/
|
|
@@ -92,4 +100,10 @@ export declare abstract class HttpProtocol extends SerdeContext implements Clien
|
|
|
92
100
|
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, headerBindings: Set<string>, dataObject: any): Promise<string[]>;
|
|
93
101
|
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any): Promise<string[]>;
|
|
94
102
|
protected getEventStreamMarshaller(): EventStreamMarshaller;
|
|
103
|
+
/**
|
|
104
|
+
* Returns a platform-specific EventStreamMarshaller.
|
|
105
|
+
* Prefers user-injected marshaller from serdeContext (via client config),
|
|
106
|
+
* falls back to the dynamically imported provider.
|
|
107
|
+
*/
|
|
108
|
+
private resolveEventStreamMarshaller;
|
|
95
109
|
}
|
|
@@ -10,10 +10,10 @@ export declare class TypeRegistry {
|
|
|
10
10
|
private schemas;
|
|
11
11
|
private exceptions;
|
|
12
12
|
static readonly registries: Map<string, TypeRegistry>;
|
|
13
|
-
|
|
13
|
+
constructor(namespace: string, schemas?: Map<string, ISchema>, exceptions?: Map<StaticErrorSchema, any>);
|
|
14
14
|
/**
|
|
15
15
|
* @param namespace - specifier.
|
|
16
|
-
* @returns the
|
|
16
|
+
* @returns the TypeRegistry for that namespace, creating it if necessary.
|
|
17
17
|
*/
|
|
18
18
|
static for(namespace: string): TypeRegistry;
|
|
19
19
|
/**
|
package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.35.1",
|
|
4
4
|
"homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/core",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
242
242
|
},
|
|
243
243
|
"dependencies": {
|
|
244
|
-
"@smithy/types": "^4.
|
|
244
|
+
"@smithy/types": "^4.19.0",
|
|
245
245
|
"tslib": "^2.6.2"
|
|
246
246
|
},
|
|
247
247
|
"devDependencies": {
|
|
@@ -339,7 +339,10 @@ const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) =>
|
|
|
339
339
|
continue;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
canonical[canonicalHeaderName] = headers[headerName]
|
|
342
|
+
canonical[canonicalHeaderName] = headers[headerName]
|
|
343
|
+
.replace(/[\r\n]/g, " ")
|
|
344
|
+
.replace(/[ \t]+/g, " ")
|
|
345
|
+
.replace(/^ | $/g, "");
|
|
343
346
|
}
|
|
344
347
|
return canonical;
|
|
345
348
|
};
|
|
@@ -14,7 +14,10 @@ export const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHead
|
|
|
14
14
|
continue;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
canonical[canonicalHeaderName] = headers[headerName]
|
|
17
|
+
canonical[canonicalHeaderName] = headers[headerName]
|
|
18
|
+
.replace(/[\r\n]/g, " ")
|
|
19
|
+
.replace(/[ \t]+/g, " ")
|
|
20
|
+
.replace(/^ | $/g, "");
|
|
18
21
|
}
|
|
19
22
|
return canonical;
|
|
20
23
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.4",
|
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
|
5
5
|
"homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/signature-v4",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"test:watch": "yarn g:vitest watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@smithy/core": "^3.
|
|
42
|
-
"@smithy/types": "^4.
|
|
41
|
+
"@smithy/core": "^3.35.0",
|
|
42
|
+
"@smithy/types": "^4.19.0",
|
|
43
43
|
"tslib": "^2.6.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-node",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.84",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from a Node.JS environment. ",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@aws-sdk/credential-provider-env": "^3.972.
|
|
49
|
-
"@aws-sdk/credential-provider-http": "^3.972.
|
|
50
|
-
"@aws-sdk/credential-provider-ini": "^3.973.
|
|
51
|
-
"@aws-sdk/credential-provider-process": "^3.972.
|
|
52
|
-
"@aws-sdk/credential-provider-sso": "^3.973.
|
|
53
|
-
"@aws-sdk/credential-provider-web-identity": "^3.972.
|
|
54
|
-
"@aws-sdk/types": "^3.974.
|
|
55
|
-
"@smithy/core": "^3.
|
|
56
|
-
"@smithy/credential-provider-imds": "^4.
|
|
57
|
-
"@smithy/types": "^4.
|
|
48
|
+
"@aws-sdk/credential-provider-env": "^3.972.72",
|
|
49
|
+
"@aws-sdk/credential-provider-http": "^3.972.74",
|
|
50
|
+
"@aws-sdk/credential-provider-ini": "^3.973.17",
|
|
51
|
+
"@aws-sdk/credential-provider-process": "^3.972.72",
|
|
52
|
+
"@aws-sdk/credential-provider-sso": "^3.973.16",
|
|
53
|
+
"@aws-sdk/credential-provider-web-identity": "^3.972.78",
|
|
54
|
+
"@aws-sdk/types": "^3.974.6",
|
|
55
|
+
"@smithy/core": "^3.35.0",
|
|
56
|
+
"@smithy/credential-provider-imds": "^4.5.2",
|
|
57
|
+
"@smithy/types": "^4.19.0",
|
|
58
58
|
"tslib": "^2.6.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.35.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4734e1c: fix for SDK ServiceException instanceof detection relating to mangled class names
|
|
8
|
+
- 4f51625: restore a compat name-string fallback in ServiceException instanceof for clients predating shapeId stamping, gated on a class-name length of at least 6
|
|
9
|
+
|
|
10
|
+
## 3.35.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 596456b: add per-request MetricsRecorder support through `client.send(command, { metricsRecorder })`
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 77e63b9: CBOR spec error handling fixes: the error identifier namespace is no longer incorrectly removed during error lookup. Code property from the body is no longer used as a fallback for error identification. Status code 500 is now classified as server fault.
|
|
19
|
+
- Updated dependencies [596456b]
|
|
20
|
+
- @smithy/types@4.19.0
|
|
21
|
+
|
|
3
22
|
## 3.34.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -902,26 +902,11 @@ const loadSmithyRpcV2CborErrorCode = (output, data) => {
|
|
|
902
902
|
if (cleanValue.indexOf(":") >= 0) {
|
|
903
903
|
cleanValue = cleanValue.split(":")[0];
|
|
904
904
|
}
|
|
905
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
906
|
-
cleanValue = cleanValue.split("#")[1];
|
|
907
|
-
}
|
|
908
905
|
return cleanValue;
|
|
909
906
|
};
|
|
910
907
|
if (data["__type"] !== undefined) {
|
|
911
908
|
return sanitizeErrorCode(data["__type"]);
|
|
912
909
|
}
|
|
913
|
-
let codeKey;
|
|
914
|
-
for (const key in data) {
|
|
915
|
-
if (!hasOwn(data, key))
|
|
916
|
-
continue;
|
|
917
|
-
if (key.toLowerCase() === "code") {
|
|
918
|
-
codeKey = key;
|
|
919
|
-
break;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
if (codeKey && data[codeKey] !== undefined) {
|
|
923
|
-
return sanitizeErrorCode(data[codeKey]);
|
|
924
|
-
}
|
|
925
910
|
};
|
|
926
911
|
const checkCborResponse = (response) => {
|
|
927
912
|
if (String(response.headers["smithy-protocol"]).toLowerCase() !== "rpc-v2-cbor") {
|
|
@@ -2278,37 +2263,37 @@ class SmithyRpcV2CborProtocol extends RpcProtocol {
|
|
|
2278
2263
|
return super.deserializeResponse(operationSchema, context, response);
|
|
2279
2264
|
}
|
|
2280
2265
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
2281
|
-
const
|
|
2266
|
+
const errorIdentifier = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
2267
|
+
const preferredNamespaces = ["*"];
|
|
2268
|
+
const { defaultNamespace } = this.options;
|
|
2269
|
+
preferredNamespaces.unshift(defaultNamespace);
|
|
2270
|
+
const [namespace, errorShapeName] = (() => {
|
|
2271
|
+
if (errorIdentifier.includes("#")) {
|
|
2272
|
+
return errorIdentifier.split("#");
|
|
2273
|
+
}
|
|
2274
|
+
return [undefined, errorIdentifier];
|
|
2275
|
+
})();
|
|
2276
|
+
if (namespace) {
|
|
2277
|
+
preferredNamespaces.unshift(namespace);
|
|
2278
|
+
}
|
|
2282
2279
|
const errorMetadata = {
|
|
2283
2280
|
$metadata: metadata,
|
|
2284
|
-
$fault: response.statusCode
|
|
2281
|
+
$fault: response.statusCode < 500 ? "client" : "server",
|
|
2285
2282
|
};
|
|
2286
|
-
|
|
2287
|
-
if (
|
|
2288
|
-
|
|
2289
|
-
}
|
|
2290
|
-
const registry = this.compositeErrorRegistry;
|
|
2291
|
-
const nsRegistry = TypeRegistry.for(namespace);
|
|
2292
|
-
registry.copyFrom(nsRegistry);
|
|
2293
|
-
let errorSchema;
|
|
2294
|
-
try {
|
|
2295
|
-
errorSchema = registry.getSchema(errorName);
|
|
2283
|
+
const preferredRegistries = [this.compositeErrorRegistry];
|
|
2284
|
+
if (namespace) {
|
|
2285
|
+
preferredRegistries.push(TypeRegistry.for(namespace));
|
|
2296
2286
|
}
|
|
2297
|
-
|
|
2287
|
+
preferredRegistries.push(TypeRegistry.for(defaultNamespace));
|
|
2288
|
+
const [errorSchema, ErrorCtor, errorMode] = this.resolveError(errorShapeName, preferredNamespaces, preferredRegistries);
|
|
2289
|
+
if (errorMode === "native" || errorMode === "synthetic") {
|
|
2298
2290
|
if (dataObject.Message) {
|
|
2299
2291
|
dataObject.message = dataObject.Message;
|
|
2300
2292
|
}
|
|
2301
|
-
const
|
|
2302
|
-
|
|
2303
|
-
const baseExceptionSchema = registry.getBaseException();
|
|
2304
|
-
if (baseExceptionSchema) {
|
|
2305
|
-
const ErrorCtor = registry.getErrorCtor(baseExceptionSchema);
|
|
2306
|
-
throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject);
|
|
2307
|
-
}
|
|
2308
|
-
throw Object.assign(new Error(errorName), errorMetadata, dataObject);
|
|
2293
|
+
const error = errorMode === "synthetic" ? new ErrorCtor({ name: errorShapeName }) : new Error(errorShapeName);
|
|
2294
|
+
throw Object.assign(error, errorMetadata, dataObject);
|
|
2309
2295
|
}
|
|
2310
2296
|
const ns = NormalizedSchema.of(errorSchema);
|
|
2311
|
-
const ErrorCtor = registry.getErrorCtor(errorSchema);
|
|
2312
2297
|
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
2313
2298
|
const exception = new ErrorCtor({});
|
|
2314
2299
|
const output = {};
|
|
@@ -590,20 +590,27 @@ class Command {
|
|
|
590
590
|
}
|
|
591
591
|
const stack = clientStack.concat(this.middlewareStack);
|
|
592
592
|
const { logger } = configuration;
|
|
593
|
+
const additionalSmithyContext = additionalContext[SMITHY_CONTEXT_KEY];
|
|
593
594
|
const handlerExecutionContext = {
|
|
594
595
|
logger,
|
|
595
596
|
clientName,
|
|
596
597
|
commandName,
|
|
597
598
|
inputFilterSensitiveLog,
|
|
598
599
|
outputFilterSensitiveLog,
|
|
600
|
+
...additionalContext,
|
|
599
601
|
[SMITHY_CONTEXT_KEY]: {
|
|
602
|
+
...additionalSmithyContext,
|
|
600
603
|
commandInstance: this,
|
|
601
604
|
...smithyContext,
|
|
605
|
+
...(options?.metricsRecorder === undefined ? {} : { metricsRecorder: options.metricsRecorder }),
|
|
602
606
|
},
|
|
603
|
-
...additionalContext,
|
|
604
607
|
};
|
|
605
608
|
const { requestHandler } = configuration;
|
|
606
609
|
let requestOptions = options ?? {};
|
|
610
|
+
if (requestOptions.metricsRecorder) {
|
|
611
|
+
requestOptions = { ...requestOptions };
|
|
612
|
+
delete requestOptions.metricsRecorder;
|
|
613
|
+
}
|
|
607
614
|
if (smithyContext.eventStream) {
|
|
608
615
|
requestOptions = {
|
|
609
616
|
isEventStream: true,
|
|
@@ -758,6 +765,7 @@ const createAggregatedClient = (commands, Client, options) => {
|
|
|
758
765
|
};
|
|
759
766
|
|
|
760
767
|
class ServiceException extends Error {
|
|
768
|
+
static shapeId = "smithy.ts.sdk.synthetic.nonamespace.client#ServiceException";
|
|
761
769
|
$fault;
|
|
762
770
|
$response;
|
|
763
771
|
$retryable;
|
|
@@ -786,10 +794,46 @@ class ServiceException extends Error {
|
|
|
786
794
|
return ServiceException.isInstance(instance);
|
|
787
795
|
}
|
|
788
796
|
if (ServiceException.isInstance(instance)) {
|
|
789
|
-
if (
|
|
790
|
-
return
|
|
797
|
+
if (this.prototype.isPrototypeOf(instance)) {
|
|
798
|
+
return true;
|
|
799
|
+
}
|
|
800
|
+
const targetId = Object.prototype.hasOwnProperty.call(this, "shapeId")
|
|
801
|
+
? this.shapeId
|
|
802
|
+
: undefined;
|
|
803
|
+
let candidateHasShapeId = false;
|
|
804
|
+
if (targetId) {
|
|
805
|
+
let proto = Object.getPrototypeOf(candidate);
|
|
806
|
+
while (proto && proto !== Object.prototype) {
|
|
807
|
+
const ctor = proto.constructor;
|
|
808
|
+
const candidateId = ctor !== ServiceException && Object.prototype.hasOwnProperty.call(ctor, "shapeId")
|
|
809
|
+
? ctor?.shapeId
|
|
810
|
+
: undefined;
|
|
811
|
+
if (candidateId) {
|
|
812
|
+
candidateHasShapeId = true;
|
|
813
|
+
if (candidateId === targetId) {
|
|
814
|
+
return true;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
proto = Object.getPrototypeOf(proto);
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
if (targetId && candidateHasShapeId) {
|
|
821
|
+
return false;
|
|
822
|
+
}
|
|
823
|
+
const targetName = this.name;
|
|
824
|
+
if (targetName && targetName.length >= 6) {
|
|
825
|
+
if (candidate.name === targetName) {
|
|
826
|
+
return true;
|
|
827
|
+
}
|
|
828
|
+
let proto = Object.getPrototypeOf(candidate);
|
|
829
|
+
while (proto && proto !== Object.prototype) {
|
|
830
|
+
const ctorName = proto.constructor?.name;
|
|
831
|
+
if (ctorName && ctorName !== "Error" && ctorName === targetName) {
|
|
832
|
+
return true;
|
|
833
|
+
}
|
|
834
|
+
proto = Object.getPrototypeOf(proto);
|
|
835
|
+
}
|
|
791
836
|
}
|
|
792
|
-
return this.prototype.isPrototypeOf(instance);
|
|
793
837
|
}
|
|
794
838
|
return false;
|
|
795
839
|
}
|