@aws-sdk/core 3.977.1 → 3.977.3

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.
Files changed (144) hide show
  1. package/dist-cjs/submodules/protocols/index.js +741 -57
  2. package/dist-es/submodules/protocols/index.js +8 -5
  3. package/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -1
  4. package/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -1
  5. package/dist-es/submodules/protocols/json/JsonSettings.js +1 -0
  6. package/dist-es/submodules/protocols/json/{JsonCodec.js → codec-v1/JsonCodec.js} +1 -1
  7. package/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +1 -0
  8. package/dist-es/submodules/protocols/json/{JsonShapeDeserializer.js → codec-v1/JsonShapeDeserializer.js} +6 -6
  9. package/dist-es/submodules/protocols/json/{JsonShapeSerializer.js → codec-v1/JsonShapeSerializer.js} +3 -3
  10. package/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +20 -0
  11. package/dist-es/submodules/protocols/json/{experimental/BufferJsonShapeDeserializer.js → codec-v2/JsonShapeDeserializer2.js} +1 -1
  12. package/dist-es/submodules/protocols/json/{experimental/ByteJsonShapeSerializer.js → codec-v2/JsonShapeSerializer2.js} +27 -13
  13. package/dist-types/submodules/protocols/index.d.ts +9 -6
  14. package/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -1
  15. package/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -1
  16. package/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +1 -1
  17. package/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +1 -1
  18. package/dist-types/submodules/protocols/json/JsonSettings.d.ts +7 -0
  19. package/dist-types/submodules/protocols/json/{JsonCodec.d.ts → codec-v1/JsonCodec.d.ts} +4 -8
  20. package/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +7 -0
  21. package/dist-types/submodules/protocols/json/{JsonShapeDeserializer.d.ts → codec-v1/JsonShapeDeserializer.d.ts} +3 -2
  22. package/dist-types/submodules/protocols/json/{JsonShapeSerializer.d.ts → codec-v1/JsonShapeSerializer.d.ts} +3 -2
  23. package/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +12 -0
  24. package/dist-types/submodules/protocols/json/{experimental/BufferJsonShapeDeserializer.d.ts → codec-v2/JsonShapeDeserializer2.d.ts} +3 -3
  25. package/dist-types/submodules/protocols/json/{experimental/ByteJsonShapeSerializer.d.ts → codec-v2/JsonShapeSerializer2.d.ts} +19 -16
  26. package/dist-types/ts3.4/api-extractor-type-index.d.ts +4 -7
  27. package/dist-types/ts3.4/index.d.ts +61 -21
  28. package/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +13 -27
  29. package/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +4 -16
  30. package/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +5 -14
  31. package/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +16 -5
  32. package/dist-types/ts3.4/submodules/client/emitWarningIfUnsupportedVersion.d.ts +4 -11
  33. package/dist-types/ts3.4/submodules/client/index.browser.d.ts +107 -47
  34. package/dist-types/ts3.4/submodules/client/index.d.ts +112 -39
  35. package/dist-types/ts3.4/submodules/client/index.native.d.ts +107 -48
  36. package/dist-types/ts3.4/submodules/client/longPollMiddleware.d.ts +13 -14
  37. package/dist-types/ts3.4/submodules/client/middleware-host-header/hostHeaderMiddleware.d.ts +25 -35
  38. package/dist-types/ts3.4/submodules/client/middleware-logger/loggerMiddleware.d.ts +14 -4
  39. package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/configuration.d.ts +2 -6
  40. package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.browser.d.ts +2 -5
  41. package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.d.ts +2 -5
  42. package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.browser.d.ts +2 -6
  43. package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.d.ts +2 -10
  44. package/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.native.d.ts +2 -6
  45. package/dist-types/ts3.4/submodules/client/middleware-user-agent/check-features.d.ts +16 -20
  46. package/dist-types/ts3.4/submodules/client/middleware-user-agent/configurations.d.ts +21 -44
  47. package/dist-types/ts3.4/submodules/client/middleware-user-agent/constants.d.ts +7 -7
  48. package/dist-types/ts3.4/submodules/client/middleware-user-agent/encode-features.d.ts +2 -5
  49. package/dist-types/ts3.4/submodules/client/middleware-user-agent/user-agent-middleware.d.ts +18 -18
  50. package/dist-types/ts3.4/submodules/client/region-config-resolver/awsRegionConfig.d.ts +8 -11
  51. package/dist-types/ts3.4/submodules/client/region-config-resolver/extensions.d.ts +14 -16
  52. package/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.browser.d.ts +1 -4
  53. package/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.d.ts +7 -14
  54. package/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.native.d.ts +1 -4
  55. package/dist-types/ts3.4/submodules/client/setCredentialFeature.d.ts +6 -7
  56. package/dist-types/ts3.4/submodules/client/setFeature.d.ts +6 -12
  57. package/dist-types/ts3.4/submodules/client/setTokenFeature.d.ts +6 -7
  58. package/dist-types/ts3.4/submodules/client/util-endpoints/aws.d.ts +2 -2
  59. package/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.d.ts +4 -5
  60. package/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/parseArn.d.ts +2 -7
  61. package/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partition.d.ts +28 -38
  62. package/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partitions.d.ts +647 -638
  63. package/dist-types/ts3.4/submodules/client/util-endpoints/lib/isIpAddress.d.ts +1 -1
  64. package/dist-types/ts3.4/submodules/client/util-endpoints/resolveDefaultAwsRegionalEndpointsConfig.d.ts +29 -56
  65. package/dist-types/ts3.4/submodules/client/util-endpoints/resolveEndpoint.d.ts +1 -1
  66. package/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointError.d.ts +1 -1
  67. package/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointRuleObject.d.ts +6 -1
  68. package/dist-types/ts3.4/submodules/client/util-endpoints/types/ErrorRuleObject.d.ts +1 -1
  69. package/dist-types/ts3.4/submodules/client/util-endpoints/types/RuleSetObject.d.ts +1 -1
  70. package/dist-types/ts3.4/submodules/client/util-endpoints/types/TreeRuleObject.d.ts +1 -1
  71. package/dist-types/ts3.4/submodules/client/util-endpoints/types/shared.d.ts +12 -1
  72. package/dist-types/ts3.4/submodules/client/util-user-agent-browser/configurations.d.ts +4 -7
  73. package/dist-types/ts3.4/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.d.ts +7 -14
  74. package/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +7 -2
  75. package/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +18 -27
  76. package/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +13 -18
  77. package/dist-types/ts3.4/submodules/client/util-user-agent-node/crt-availability.d.ts +3 -8
  78. package/dist-types/ts3.4/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +17 -28
  79. package/dist-types/ts3.4/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.d.ts +2 -6
  80. package/dist-types/ts3.4/submodules/client/util-user-agent-node/is-crt-available.d.ts +2 -5
  81. package/dist-types/ts3.4/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.d.ts +4 -13
  82. package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +9 -10
  83. package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +39 -44
  84. package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +2 -5
  85. package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.d.ts +1 -6
  86. package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +1 -7
  87. package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +4 -13
  88. package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +23 -7
  89. package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +13 -38
  90. package/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +57 -133
  91. package/dist-types/ts3.4/submodules/httpAuthSchemes/index.browser.d.ts +32 -11
  92. package/dist-types/ts3.4/submodules/httpAuthSchemes/index.d.ts +32 -9
  93. package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.d.ts +1 -8
  94. package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.d.ts +1 -6
  95. package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getDateHeader.d.ts +2 -8
  96. package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +1 -8
  97. package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +6 -26
  98. package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/index.d.ts +4 -4
  99. package/dist-types/ts3.4/submodules/httpAuthSchemes/utils/isClockSkewed.d.ts +1 -9
  100. package/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +5 -8
  101. package/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +40 -74
  102. package/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +9 -24
  103. package/dist-types/ts3.4/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +36 -25
  104. package/dist-types/ts3.4/submodules/protocols/coercing-serializers.d.ts +3 -18
  105. package/dist-types/ts3.4/submodules/protocols/common.d.ts +5 -2
  106. package/dist-types/ts3.4/submodules/protocols/index.d.ts +30 -22
  107. package/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +21 -22
  108. package/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +21 -22
  109. package/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +49 -29
  110. package/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +49 -36
  111. package/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +4 -0
  112. package/dist-types/ts3.4/submodules/protocols/json/awsExpectUnion.d.ts +1 -7
  113. package/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +11 -0
  114. package/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +4 -0
  115. package/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +13 -0
  116. package/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +18 -0
  117. package/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +9 -0
  118. package/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +14 -0
  119. package/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +39 -0
  120. package/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
  121. package/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +7 -21
  122. package/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +7 -15
  123. package/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +2 -11
  124. package/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +14 -22
  125. package/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +18 -27
  126. package/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +57 -49
  127. package/dist-types/ts3.4/submodules/protocols/query/QuerySerializerSettings.d.ts +7 -13
  128. package/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +21 -16
  129. package/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +1 -4
  130. package/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +47 -31
  131. package/dist-types/ts3.4/submodules/protocols/xml/XmlCodec.d.ts +17 -14
  132. package/dist-types/ts3.4/submodules/protocols/xml/XmlShapeDeserializer.d.ts +15 -20
  133. package/dist-types/ts3.4/submodules/protocols/xml/XmlShapeSerializer.d.ts +21 -21
  134. package/dist-types/ts3.4/submodules/protocols/xml/parseXmlBody.d.ts +4 -13
  135. package/dist-types/ts3.4/submodules/protocols/xml/simpleFormatXml.d.ts +1 -6
  136. package/dist-types/ts3.4/submodules/util/index.d.ts +3 -3
  137. package/dist-types/ts3.4/submodules/util/util-arn-parser/arn.d.ts +14 -32
  138. package/dist-types/ts3.4/submodules/util/util-format-url/format-url.d.ts +4 -2
  139. package/package.json +3 -3
  140. package/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +0 -19
  141. package/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +0 -13
  142. package/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +0 -28
  143. package/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +0 -29
  144. package/dist-types/ts3.4/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +0 -57
@@ -1,13 +1,14 @@
1
1
  export { AwsSmithyRpcV2CborProtocol } from "./cbor/AwsSmithyRpcV2CborProtocol";
2
- export { _toStr, _toBool, _toNum } from "./coercing-serializers";
3
2
  export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
4
3
  export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
5
4
  export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
6
5
  export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
7
- export { JsonCodec } from "./json/JsonCodec";
8
- export { JsonShapeDeserializer } from "./json/JsonShapeDeserializer";
9
- export { JsonShapeSerializer } from "./json/JsonShapeSerializer";
10
- export { awsExpectUnion } from "./json/awsExpectUnion";
6
+ export { JsonCodec } from "./json/codec-v1/JsonCodec";
7
+ export { JsonShapeDeserializer } from "./json/codec-v1/JsonShapeDeserializer";
8
+ export { JsonShapeSerializer } from "./json/codec-v1/JsonShapeSerializer";
9
+ export { JsonCodec2 } from "./json/codec-v2/JsonCodec2";
10
+ export { JsonShapeDeserializer2 } from "./json/codec-v2/JsonShapeDeserializer2";
11
+ export { JsonShapeSerializer2 } from "./json/codec-v2/JsonShapeSerializer2";
11
12
  export { parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode, loadJsonRpcErrorCode } from "./json/parseJsonBody";
12
13
  export { AwsEc2QueryProtocol } from "./query/AwsEc2QueryProtocol";
13
14
  export { AwsQueryProtocol } from "./query/AwsQueryProtocol";
@@ -17,3 +18,5 @@ export { XmlCodec } from "./xml/XmlCodec";
17
18
  export { XmlShapeDeserializer } from "./xml/XmlShapeDeserializer";
18
19
  export { XmlShapeSerializer } from "./xml/XmlShapeSerializer";
19
20
  export { parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode } from "./xml/parseXmlBody";
21
+ export { awsExpectUnion } from "./json/awsExpectUnion";
22
+ export { _toStr, _toBool, _toNum } from "./coercing-serializers";
@@ -1,7 +1,7 @@
1
1
  import { RpcProtocol } from "@smithy/core/protocols";
2
2
  import { deref, NormalizedSchema } from "@smithy/core/schema";
3
3
  import { ProtocolLib } from "../ProtocolLib";
4
- import { JsonCodec } from "./JsonCodec";
4
+ import { JsonCodec } from "./codec-v1/JsonCodec";
5
5
  import { loadJsonRpcErrorCode } from "./parseJsonBody";
6
6
  export class AwsJsonRpcProtocol extends RpcProtocol {
7
7
  serializer;
@@ -1,7 +1,7 @@
1
1
  import { HttpBindingProtocol, HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer, } from "@smithy/core/protocols";
2
2
  import { NormalizedSchema } from "@smithy/core/schema";
3
3
  import { ProtocolLib } from "../ProtocolLib";
4
- import { JsonCodec } from "./JsonCodec";
4
+ import { JsonCodec } from "./codec-v1/JsonCodec";
5
5
  import { loadRestJsonErrorCode } from "./parseJsonBody";
6
6
  export class AwsRestJsonProtocol extends HttpBindingProtocol {
7
7
  serializer;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { SerdeContextConfig } from "../ConfigurableSerdeContext";
1
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
2
2
  import { JsonShapeDeserializer } from "./JsonShapeDeserializer";
3
3
  import { JsonShapeSerializer } from "./JsonShapeSerializer";
4
4
  export class JsonCodec extends SerdeContextConfig {
@@ -2,12 +2,12 @@ import { determineTimestampFormat } from "@smithy/core/protocols";
2
2
  import { NormalizedSchema } from "@smithy/core/schema";
3
3
  import { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from "@smithy/core/serde";
4
4
  import { fromBase64 } from "@smithy/core/serde";
5
- import { SerdeContextConfig } from "../ConfigurableSerdeContext";
6
- import { UnionSerde } from "../UnionSerde";
7
- import { jsonReviver } from "./jsonReviver";
8
- import { needsReviver } from "./needsReviver";
9
- import { parseJsonBody } from "./parseJsonBody";
10
- import { writeKey } from "../writeKey";
5
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
6
+ import { UnionSerde } from "../../UnionSerde";
7
+ import { jsonReviver } from "../jsonReviver";
8
+ import { needsReviver } from "../needsReviver";
9
+ import { parseJsonBody } from "../parseJsonBody";
10
+ import { writeKey } from "../../writeKey";
11
11
  export class JsonShapeDeserializer extends SerdeContextConfig {
12
12
  settings;
13
13
  constructor(settings) {
@@ -1,9 +1,9 @@
1
1
  import { determineTimestampFormat } from "@smithy/core/protocols";
2
2
  import { NormalizedSchema } from "@smithy/core/schema";
3
3
  import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue, toBase64 } from "@smithy/core/serde";
4
- import { SerdeContextConfig } from "../ConfigurableSerdeContext";
5
- import { JsonReplacer } from "./jsonReplacer";
6
- import { writeKey } from "../writeKey";
4
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
5
+ import { JsonReplacer } from "../jsonReplacer";
6
+ import { writeKey } from "../../writeKey";
7
7
  export class JsonShapeSerializer extends SerdeContextConfig {
8
8
  settings;
9
9
  buffer;
@@ -0,0 +1,20 @@
1
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
2
+ import { JsonShapeDeserializer2 } from "./JsonShapeDeserializer2";
3
+ import { JsonShapeSerializer2 } from "./JsonShapeSerializer2";
4
+ export class JsonCodec2 extends SerdeContextConfig {
5
+ settings;
6
+ constructor(settings) {
7
+ super();
8
+ this.settings = settings;
9
+ }
10
+ createSerializer() {
11
+ const serializer = new JsonShapeSerializer2(this.settings);
12
+ serializer.setSerdeContext(this.serdeContext);
13
+ return serializer;
14
+ }
15
+ createDeserializer() {
16
+ const deserializer = new JsonShapeDeserializer2(this.settings);
17
+ deserializer.setSerdeContext(this.serdeContext);
18
+ return deserializer;
19
+ }
20
+ }
@@ -9,7 +9,7 @@ import { jsonReviver } from "../jsonReviver";
9
9
  import { needsReviver } from "../needsReviver";
10
10
  import { parseJsonBody } from "../parseJsonBody";
11
11
  import { writeKey } from "../../writeKey";
12
- export class BufferJsonShapeDeserializer extends SerdeContextConfig {
12
+ export class JsonShapeDeserializer2 extends SerdeContextConfig {
13
13
  settings;
14
14
  constructor(settings) {
15
15
  super();
@@ -32,11 +32,13 @@ const INITIAL_BUFFER_SIZE = 2048;
32
32
  function alloc(size) {
33
33
  return typeof Buffer !== "undefined" ? Buffer.allocUnsafe(size) : new Uint8Array(size);
34
34
  }
35
- export class ByteJsonShapeSerializer extends SerdeContextConfig {
35
+ export class JsonShapeSerializer2 extends SerdeContextConfig {
36
36
  settings;
37
37
  json;
38
38
  i = 0;
39
39
  rootSchema;
40
+ rawValue;
41
+ passthrough = false;
40
42
  constructor(settings) {
41
43
  super();
42
44
  this.settings = settings;
@@ -44,8 +46,15 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
44
46
  }
45
47
  write(schema, value) {
46
48
  this.i = 0;
49
+ this.rawValue = value;
47
50
  this.rootSchema = NormalizedSchema.of(schema);
48
- this.writeValue(this.rootSchema, value, undefined);
51
+ this.passthrough =
52
+ !this.rootSchema.isStructSchema() &&
53
+ !this.rootSchema.isDocumentSchema() &&
54
+ (this.rootSchema.isBlobSchema() || this.rootSchema.isStringSchema());
55
+ if (!this.passthrough) {
56
+ this.writeValue(this.rootSchema, value, undefined);
57
+ }
49
58
  }
50
59
  writeDiscriminatedDocument(schema, value) {
51
60
  this.i = 0;
@@ -85,6 +94,11 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
85
94
  this.rootSchema = undefined;
86
95
  const finalPosition = this.i;
87
96
  this.i = 0;
97
+ const raw = this.rawValue;
98
+ this.rawValue = undefined;
99
+ if (finalPosition === 0) {
100
+ return raw;
101
+ }
88
102
  const result = this.json.subarray(0, finalPosition);
89
103
  this.json = alloc(INITIAL_BUFFER_SIZE);
90
104
  return result;
@@ -198,7 +212,7 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
198
212
  const b64Len = Math.ceil(data.length / 3) * 4;
199
213
  this.ensure(b64Len + 2);
200
214
  const json = this.json;
201
- const B64 = ByteJsonShapeSerializer.B64;
215
+ const B64 = JsonShapeSerializer2.B64;
202
216
  let i = this.i;
203
217
  json[i++] = QUOTE;
204
218
  const len = data.length;
@@ -250,6 +264,16 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
250
264
  }
251
265
  const ns = NormalizedSchema.of(schema);
252
266
  const isObject = typeof value === "object";
267
+ if (ns.isStringSchema()) {
268
+ const mediaType = ns.getMergedTraits().mediaType;
269
+ if (mediaType) {
270
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
271
+ if (isJson) {
272
+ this.writeJsonString(LazyJsonString.from(value).toString());
273
+ return;
274
+ }
275
+ }
276
+ }
253
277
  if (isObject) {
254
278
  if (ns.isStructSchema()) {
255
279
  this.writeStruct(ns, value);
@@ -289,16 +313,6 @@ export class ByteJsonShapeSerializer extends SerdeContextConfig {
289
313
  return;
290
314
  }
291
315
  if (typeof value === "string") {
292
- if (ns.isStringSchema()) {
293
- const mediaType = ns.getMergedTraits().mediaType;
294
- if (mediaType) {
295
- const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
296
- if (isJson) {
297
- this.writeJsonString(LazyJsonString.from(value).toString());
298
- return;
299
- }
300
- }
301
- }
302
316
  if (ns.isBlobSchema()) {
303
317
  const b64 = (this.serdeContext?.base64Encoder ?? toBase64)(value);
304
318
  this.writeAsciiQuoted(b64);
@@ -1,14 +1,15 @@
1
1
  export { AwsSmithyRpcV2CborProtocol } from "./cbor/AwsSmithyRpcV2CborProtocol";
2
- export { _toStr, _toBool, _toNum } from "./coercing-serializers";
3
2
  export { AwsJson1_0Protocol } from "./json/AwsJson1_0Protocol";
4
3
  export { AwsJson1_1Protocol } from "./json/AwsJson1_1Protocol";
5
4
  export { AwsJsonRpcProtocol } from "./json/AwsJsonRpcProtocol";
6
5
  export { AwsRestJsonProtocol } from "./json/AwsRestJsonProtocol";
7
- export { JsonCodec } from "./json/JsonCodec";
8
- export type { JsonSettings } from "./json/JsonCodec";
9
- export { JsonShapeDeserializer } from "./json/JsonShapeDeserializer";
10
- export { JsonShapeSerializer } from "./json/JsonShapeSerializer";
11
- export { awsExpectUnion } from "./json/awsExpectUnion";
6
+ export { JsonCodec } from "./json/codec-v1/JsonCodec";
7
+ export type { JsonSettings } from "./json/JsonSettings";
8
+ export { JsonShapeDeserializer } from "./json/codec-v1/JsonShapeDeserializer";
9
+ export { JsonShapeSerializer } from "./json/codec-v1/JsonShapeSerializer";
10
+ export { JsonCodec2 } from "./json/codec-v2/JsonCodec2";
11
+ export { JsonShapeDeserializer2 } from "./json/codec-v2/JsonShapeDeserializer2";
12
+ export { JsonShapeSerializer2 } from "./json/codec-v2/JsonShapeSerializer2";
12
13
  export { parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode, loadJsonRpcErrorCode } from "./json/parseJsonBody";
13
14
  export { AwsEc2QueryProtocol } from "./query/AwsEc2QueryProtocol";
14
15
  export { AwsQueryProtocol } from "./query/AwsQueryProtocol";
@@ -20,3 +21,5 @@ export type { XmlSettings } from "./xml/XmlCodec";
20
21
  export { XmlShapeDeserializer } from "./xml/XmlShapeDeserializer";
21
22
  export { XmlShapeSerializer } from "./xml/XmlShapeSerializer";
22
23
  export { parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode } from "./xml/parseXmlBody";
24
+ export { awsExpectUnion } from "./json/awsExpectUnion";
25
+ export { _toStr, _toBool, _toNum } from "./coercing-serializers";
@@ -1,6 +1,6 @@
1
1
  import type { TypeRegistry } from "@smithy/core/schema";
2
2
  import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
3
- import type { JsonCodec } from "./JsonCodec";
3
+ import type { JsonCodec } from "./codec-v1/JsonCodec";
4
4
  /**
5
5
  * @public
6
6
  * @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
@@ -1,6 +1,6 @@
1
1
  import type { TypeRegistry } from "@smithy/core/schema";
2
2
  import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
3
- import type { JsonCodec } from "./JsonCodec";
3
+ import type { JsonCodec } from "./codec-v1/JsonCodec";
4
4
  /**
5
5
  * @public
6
6
  * @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
@@ -1,7 +1,7 @@
1
1
  import { RpcProtocol } from "@smithy/core/protocols";
2
2
  import type { TypeRegistry } from "@smithy/core/schema";
3
3
  import type { EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
4
- import { JsonCodec } from "./JsonCodec";
4
+ import { JsonCodec } from "./codec-v1/JsonCodec";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -1,7 +1,7 @@
1
1
  import { HttpBindingProtocol } from "@smithy/core/protocols";
2
2
  import type { TypeRegistry } from "@smithy/core/schema";
3
3
  import type { EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
4
- import { JsonCodec } from "./JsonCodec";
4
+ import { JsonCodec } from "./codec-v1/JsonCodec";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -0,0 +1,7 @@
1
+ import type { CodecSettings } from "@smithy/types";
2
+ /**
3
+ * @public
4
+ */
5
+ export type JsonSettings = CodecSettings & {
6
+ jsonName: boolean;
7
+ };
@@ -1,14 +1,10 @@
1
- import type { Codec, CodecSettings } from "@smithy/types";
2
- import { SerdeContextConfig } from "../ConfigurableSerdeContext";
1
+ import type { Codec } from "@smithy/types";
2
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
3
  import { JsonShapeDeserializer } from "./JsonShapeDeserializer";
4
4
  import { JsonShapeSerializer } from "./JsonShapeSerializer";
5
+ import type { JsonSettings } from "./JsonSettings";
5
6
  /**
6
- * @public
7
- */
8
- export type JsonSettings = CodecSettings & {
9
- jsonName: boolean;
10
- };
11
- /**
7
+ * @deprecated use JsonCodec2.
12
8
  * @public
13
9
  */
14
10
  export declare class JsonCodec extends SerdeContextConfig implements Codec<string, string> {
@@ -0,0 +1,7 @@
1
+ import type { CodecSettings } from "@smithy/types";
2
+ /**
3
+ * @public
4
+ */
5
+ export type JsonSettings = CodecSettings & {
6
+ jsonName: boolean;
7
+ };
@@ -1,7 +1,8 @@
1
1
  import type { DocumentType, Schema, ShapeDeserializer } from "@smithy/types";
2
- import { SerdeContextConfig } from "../ConfigurableSerdeContext";
3
- import type { JsonSettings } from "./JsonCodec";
2
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
+ import type { JsonSettings } from "./JsonSettings";
4
4
  /**
5
+ * @deprecated prefer JsonShapeDeserializer in codec-v2.
5
6
  * @public
6
7
  */
7
8
  export declare class JsonShapeDeserializer extends SerdeContextConfig implements ShapeDeserializer<string> {
@@ -1,8 +1,9 @@
1
1
  import { NormalizedSchema } from "@smithy/core/schema";
2
2
  import type { Schema, ShapeSerializer } from "@smithy/types";
3
- import { SerdeContextConfig } from "../ConfigurableSerdeContext";
4
- import type { JsonSettings } from "./JsonCodec";
3
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
4
+ import type { JsonSettings } from "./JsonSettings";
5
5
  /**
6
+ * @deprecated prefer byte-targeting JsonShapeSerializer or its string adapter StringJsonShapeSerializer in codec-v2.
6
7
  * @public
7
8
  */
8
9
  export declare class JsonShapeSerializer extends SerdeContextConfig implements ShapeSerializer<string> {
@@ -0,0 +1,12 @@
1
+ import type { $ShapeSerializer, $Codec, $ShapeDeserializer } from "@smithy/types";
2
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
+ import type { JsonSettings } from "../JsonSettings";
4
+ /**
5
+ * @public
6
+ */
7
+ export declare class JsonCodec2 extends SerdeContextConfig implements $Codec<Uint8Array, string> {
8
+ readonly settings: JsonSettings;
9
+ constructor(settings: JsonSettings);
10
+ createSerializer(): $ShapeSerializer<Uint8Array>;
11
+ createDeserializer(): $ShapeDeserializer<string>;
12
+ }
@@ -1,6 +1,6 @@
1
1
  import type { DocumentType, Schema, ShapeDeserializer } from "@smithy/types";
2
2
  import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import type { JsonSettings } from "../JsonCodec";
3
+ import type { JsonSettings } from "../JsonSettings";
4
4
  /**
5
5
  * Performance-optimized JSON deserializer.
6
6
  *
@@ -17,9 +17,9 @@ import type { JsonSettings } from "../JsonCodec";
17
17
  * after JSON.parse with no external references, so rewriting values avoids
18
18
  * redundant allocation and GC pressure.
19
19
  *
20
- * @internal
20
+ * @public
21
21
  */
22
- export declare class BufferJsonShapeDeserializer extends SerdeContextConfig implements ShapeDeserializer<string> {
22
+ export declare class JsonShapeDeserializer2 extends SerdeContextConfig implements ShapeDeserializer<string> {
23
23
  readonly settings: JsonSettings;
24
24
  constructor(settings: JsonSettings);
25
25
  read(schema: Schema, data: string | Uint8Array | unknown): Promise<any>;
@@ -1,17 +1,20 @@
1
+ import { NormalizedSchema } from "@smithy/core/schema";
1
2
  import type { Schema, ShapeSerializer } from "@smithy/types";
2
3
  import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
3
- import type { JsonSettings } from "../JsonCodec";
4
+ import type { JsonSettings } from "../JsonSettings";
4
5
  /**
5
- * Experimental single-pass JSON serializer that writes directly to a Uint8Array buffer.
6
+ * Single-pass JSON serializer that writes directly to a Uint8Array buffer.
6
7
  * Fewer intermediate states as when compared to the initial multi-pass implementation.
7
8
  *
8
- * @internal
9
+ * @public
9
10
  */
10
- export declare class ByteJsonShapeSerializer extends SerdeContextConfig implements ShapeSerializer<Uint8Array> {
11
+ export declare class JsonShapeSerializer2 extends SerdeContextConfig implements ShapeSerializer<Uint8Array> {
11
12
  readonly settings: JsonSettings;
12
13
  private json;
13
14
  private i;
14
15
  private rootSchema;
16
+ private rawValue;
17
+ private passthrough;
15
18
  constructor(settings: JsonSettings);
16
19
  write(schema: Schema, value: unknown): void;
17
20
  /**
@@ -23,12 +26,12 @@ export declare class ByteJsonShapeSerializer extends SerdeContextConfig implemen
23
26
  * This is the primary output — pass directly to request.body.
24
27
  */
25
28
  flush(): Uint8Array;
26
- private ensure;
29
+ protected ensure(byteCount: number): void;
27
30
  /**
28
31
  * Write a raw ASCII string (no JSON escaping). Used for pre-validated content
29
32
  * like numeric literals and pre-encoded base64.
30
33
  */
31
- private writeAscii;
34
+ protected writeAscii(s: string): void;
32
35
  /**
33
36
  * Write a quoted ASCII string with no escape checking.
34
37
  * Used for struct member keys (jsonName or model names) which are
@@ -36,22 +39,22 @@ export declare class ByteJsonShapeSerializer extends SerdeContextConfig implemen
36
39
  * backslashes, or non-ASCII.
37
40
  * Ensures extra room for surrounding structural chars (comma, colon).
38
41
  */
39
- private writeAsciiQuoted;
42
+ protected writeAsciiQuoted(s: string): void;
40
43
  /**
41
44
  * Write a JSON-escaped string including the surrounding quotes.
42
45
  * Fast-path for ASCII, falls back to TextEncoder for multi-byte.
43
46
  */
44
- private writeJsonString;
45
- private writeUnicodeEscape;
46
- private static readonly B64;
47
+ protected writeJsonString(s: string): void;
48
+ protected writeUnicodeEscape(code: number): void;
49
+ protected static readonly B64: Uint8Array;
47
50
  /**
48
51
  * Write a Uint8Array as a quoted base64 string directly into the buffer.
49
52
  * No intermediate JS string, no escape checking (base64 alphabet is safe ASCII).
50
53
  */
51
- private writeBase64;
52
- private writeValue;
53
- private writeStruct;
54
- private writeList;
55
- private writeMap;
56
- private writeTimestamp;
54
+ protected writeBase64(data: Uint8Array): void;
55
+ protected writeValue(schema: Schema, value: unknown, container: NormalizedSchema | undefined): void;
56
+ protected writeStruct(ns: NormalizedSchema, value: Record<string, unknown>): void;
57
+ protected writeList(ns: NormalizedSchema, value: unknown[], isDocument?: boolean): void;
58
+ protected writeMap(ns: NormalizedSchema, value: Record<string, unknown>, isDocument?: boolean): void;
59
+ protected writeTimestamp(ns: NormalizedSchema, value: Date): void;
57
60
  }
@@ -1,7 +1,4 @@
1
- export * from "./submodules/account-id-endpoint/index";
2
- export * from "./submodules/client/index";
3
- export * from "./submodules/httpAuthSchemes/index";
4
- export * from "./submodules/protocols/index";
5
- /**
6
- * no need to export this.
7
- */
1
+ export * from "./submodules/account-id-endpoint/index";
2
+ export * from "./submodules/client/index";
3
+ export * from "./submodules/httpAuthSchemes/index";
4
+ export * from "./submodules/protocols/index";
@@ -1,21 +1,61 @@
1
- /**
2
- * Exports here are from before the submodule system.
3
- * They are exported from the package's root index to preserve backwards compatibility.
4
- *
5
- * New development should go in a proper submodule and not be exported from the root index.
6
- * There is an eslint rule banning imports from `@aws-sdk/core` without a submodule e.g. `@aws-sdk/core/protocols`.
7
- *
8
- * CAUTION: Do not use export * here. Explicit named exports lock down the public API surface
9
- * so that additions to submodules do not accidentally become part of the legacy root export.
10
- *
11
- * No additional exports are allowed.
12
- */
13
- export { emitWarningIfUnsupportedVersion, getLongPollPlugin, setCredentialFeature, setFeature, setTokenFeature, state, } from "@aws-sdk/core/client";
14
- export { AwsSdkSigV4ASigner, AwsSdkSigV4Signer, AwsSdkSigV4Signer as AWSSDKSigV4Signer, getBearerTokenEnvKey, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, NODE_SIGV4A_CONFIG_OPTIONS, resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config, resolveAwsSdkSigV4Config as resolveAWSSDKSigV4Config, validateSigningProperties, } from "@aws-sdk/core/httpAuthSchemes";
15
- export { AwsSdkSigV4AAuthInputConfig, AwsSdkSigV4AAuthResolvedConfig, AwsSdkSigV4AAuthResolvedConfig as AwsSdkSigV4APreviouslyResolved, AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthInputConfig as AWSSDKSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4AuthResolvedConfig as AWSSDKSigV4AuthResolvedConfig, AwsSdkSigV4Memoized, AwsSdkSigV4AuthResolvedConfig as AwsSdkSigV4PreviouslyResolved, AwsSdkSigV4AuthResolvedConfig as AWSSDKSigV4PreviouslyResolved, } from "@aws-sdk/core/httpAuthSchemes";
16
- export { _toBool, _toNum, _toStr, awsExpectUnion, AwsEc2QueryProtocol, AwsJson1_0Protocol, AwsJson1_1Protocol, AwsJsonRpcProtocol, AwsQueryProtocol, AwsRestJsonProtocol, AwsRestXmlProtocol, AwsSmithyRpcV2CborProtocol, JsonCodec, JsonShapeDeserializer, JsonShapeSerializer, loadJsonRpcErrorCode, loadRestJsonErrorCode, loadRestXmlErrorCode, parseJsonBody, parseJsonErrorBody, parseXmlBody, parseXmlErrorBody, QueryShapeSerializer, XmlCodec, XmlShapeDeserializer, XmlShapeSerializer, } from "@aws-sdk/core/protocols";
17
- export { JsonSettings, QuerySerializerSettings, XmlSettings } from "@aws-sdk/core/protocols";
18
- /**
19
- * WARNING: do not export any additional submodules from the root of this package. See readme.md for
20
- * guide on developing submodules.
21
- */
1
+ export {
2
+ emitWarningIfUnsupportedVersion,
3
+ getLongPollPlugin,
4
+ setCredentialFeature,
5
+ setFeature,
6
+ setTokenFeature,
7
+ state,
8
+ } from "@aws-sdk/core/client";
9
+ export {
10
+ AwsSdkSigV4ASigner,
11
+ AwsSdkSigV4Signer,
12
+ AwsSdkSigV4Signer as AWSSDKSigV4Signer,
13
+ getBearerTokenEnvKey,
14
+ NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
15
+ NODE_SIGV4A_CONFIG_OPTIONS,
16
+ resolveAwsSdkSigV4AConfig,
17
+ resolveAwsSdkSigV4Config,
18
+ resolveAwsSdkSigV4Config as resolveAWSSDKSigV4Config,
19
+ validateSigningProperties,
20
+ } from "@aws-sdk/core/httpAuthSchemes";
21
+ export {
22
+ AwsSdkSigV4AAuthInputConfig,
23
+ AwsSdkSigV4AAuthResolvedConfig,
24
+ AwsSdkSigV4AAuthResolvedConfig as AwsSdkSigV4APreviouslyResolved,
25
+ AwsSdkSigV4AuthInputConfig,
26
+ AwsSdkSigV4AuthInputConfig as AWSSDKSigV4AuthInputConfig,
27
+ AwsSdkSigV4AuthResolvedConfig,
28
+ AwsSdkSigV4AuthResolvedConfig as AWSSDKSigV4AuthResolvedConfig,
29
+ AwsSdkSigV4Memoized,
30
+ AwsSdkSigV4AuthResolvedConfig as AwsSdkSigV4PreviouslyResolved,
31
+ AwsSdkSigV4AuthResolvedConfig as AWSSDKSigV4PreviouslyResolved,
32
+ } from "@aws-sdk/core/httpAuthSchemes";
33
+ export {
34
+ _toBool,
35
+ _toNum,
36
+ _toStr,
37
+ awsExpectUnion,
38
+ AwsEc2QueryProtocol,
39
+ AwsJson1_0Protocol,
40
+ AwsJson1_1Protocol,
41
+ AwsJsonRpcProtocol,
42
+ AwsQueryProtocol,
43
+ AwsRestJsonProtocol,
44
+ AwsRestXmlProtocol,
45
+ AwsSmithyRpcV2CborProtocol,
46
+ JsonCodec,
47
+ JsonShapeDeserializer,
48
+ JsonShapeSerializer,
49
+ loadJsonRpcErrorCode,
50
+ loadRestJsonErrorCode,
51
+ loadRestXmlErrorCode,
52
+ parseJsonBody,
53
+ parseJsonErrorBody,
54
+ parseXmlBody,
55
+ parseXmlErrorBody,
56
+ QueryShapeSerializer,
57
+ XmlCodec,
58
+ XmlShapeDeserializer,
59
+ XmlShapeSerializer,
60
+ } from "@aws-sdk/core/protocols";
61
+ export { JsonSettings, QuerySerializerSettings, XmlSettings } from "@aws-sdk/core/protocols";
@@ -1,27 +1,13 @@
1
- import { Provider } from "@smithy/types";
2
- import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
3
- /**
4
- * @public
5
- */
6
- export interface AccountIdEndpointModeInputConfig {
7
- /**
8
- * The account ID endpoint mode to use.
9
- */
10
- accountIdEndpointMode?: AccountIdEndpointMode | Provider<AccountIdEndpointMode>;
11
- }
12
- /**
13
- * @internal
14
- */
15
- interface PreviouslyResolved {
16
- }
17
- /**
18
- * @internal
19
- */
20
- export interface AccountIdEndpointModeResolvedConfig {
21
- accountIdEndpointMode: Provider<AccountIdEndpointMode>;
22
- }
23
- /**
24
- * @internal
25
- */
26
- export declare const resolveAccountIdEndpointModeConfig: <T>(input: T & AccountIdEndpointModeInputConfig & PreviouslyResolved) => T & AccountIdEndpointModeResolvedConfig;
27
- export {};
1
+ import { Provider } from "@smithy/types";
2
+ import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
3
+ export interface AccountIdEndpointModeInputConfig {
4
+ accountIdEndpointMode?: AccountIdEndpointMode | Provider<AccountIdEndpointMode>;
5
+ }
6
+ interface PreviouslyResolved {}
7
+ export interface AccountIdEndpointModeResolvedConfig {
8
+ accountIdEndpointMode: Provider<AccountIdEndpointMode>;
9
+ }
10
+ export declare const resolveAccountIdEndpointModeConfig: <T>(
11
+ input: T & AccountIdEndpointModeInputConfig & PreviouslyResolved,
12
+ ) => T & AccountIdEndpointModeResolvedConfig;
13
+ export {};
@@ -1,16 +1,4 @@
1
- /**
2
- * @public
3
- */
4
- export type AccountIdEndpointMode = "disabled" | "preferred" | "required";
5
- /**
6
- * @internal
7
- */
8
- export declare const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
9
- /**
10
- * @internal
11
- */
12
- export declare const ACCOUNT_ID_ENDPOINT_MODE_VALUES: AccountIdEndpointMode[];
13
- /**
14
- * @internal
15
- */
16
- export declare function validateAccountIdEndpointMode(value: any): value is AccountIdEndpointMode;
1
+ export type AccountIdEndpointMode = "disabled" | "preferred" | "required";
2
+ export declare const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
3
+ export declare const ACCOUNT_ID_ENDPOINT_MODE_VALUES: AccountIdEndpointMode[];
4
+ export declare function validateAccountIdEndpointMode(value: any): value is AccountIdEndpointMode;
@@ -1,14 +1,5 @@
1
- import { LoadedConfigSelectors } from "@smithy/core/config";
2
- import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
3
- /**
4
- * @internal
5
- */
6
- export declare const ENV_ACCOUNT_ID_ENDPOINT_MODE = "AWS_ACCOUNT_ID_ENDPOINT_MODE";
7
- /**
8
- * @internal
9
- */
10
- export declare const CONFIG_ACCOUNT_ID_ENDPOINT_MODE = "account_id_endpoint_mode";
11
- /**
12
- * @internal
13
- */
14
- export declare const NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS: LoadedConfigSelectors<AccountIdEndpointMode>;
1
+ import { LoadedConfigSelectors } from "@smithy/core/config";
2
+ import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
3
+ export declare const ENV_ACCOUNT_ID_ENDPOINT_MODE = "AWS_ACCOUNT_ID_ENDPOINT_MODE";
4
+ export declare const CONFIG_ACCOUNT_ID_ENDPOINT_MODE = "account_id_endpoint_mode";
5
+ export declare const NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS: LoadedConfigSelectors<AccountIdEndpointMode>;