@cdklabs/cdk-ecs-codedeploy 0.0.451 → 0.0.453
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/.jsii +3 -3
- package/lib/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-es/index.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.browser.d.ts +38 -38
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.d.ts +36 -36
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.native.d.ts +37 -37
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.browser.d.ts +54 -56
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.d.ts +57 -57
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.native.d.ts +58 -60
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/client-codedeploy/package.json +6 -6
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1063 -945
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +5 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +42 -12
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +93 -9
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-endpoints/lib/aws/partitions.d.ts +54 -54
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +4 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +5 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partitions.d.ts +54 -54
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +1 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +1 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +1 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +3 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +4 -1
- package/node_modules/@aws-sdk/core/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +35 -28
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js +35 -28
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/LoginCredentialsFetcher.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/LoginCredentialsFetcher.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-login/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +41 -41
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.browser.d.ts +43 -43
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +43 -43
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.native.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.browser.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.native.d.ts +41 -41
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +41 -41
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +44 -44
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +35 -35
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +43 -43
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +64 -66
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +65 -65
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +68 -70
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +67 -69
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +66 -66
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +71 -73
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +64 -66
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +65 -65
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +68 -70
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +64 -66
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +65 -65
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +68 -70
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +68 -70
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +68 -68
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +72 -74
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/package.json +5 -5
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
- package/node_modules/@aws-sdk/token-providers/package.json +5 -5
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +23 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +23 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +17 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +0 -10
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +4 -4
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +19 -19
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +3 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +6 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +8 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +0 -2
- package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +1 -7
- package/node_modules/@smithy/core/dist-types/submodules/config/config-resolver/regionConfig/checkRegion.d.ts +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateCondition.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateConditions.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateExpression.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateRules.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/getEndpointProperties.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/getReferenceValue.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/event-streams/EventStreamSerde.d.ts +14 -2
- package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +7 -2
- package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/retries-2026-config.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/serde/parse-utils.d.ts +5 -5
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +1 -7
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/config/config-resolver/regionConfig/checkRegion.d.ts +2 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateCondition.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateConditions.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateExpression.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateRules.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/getEndpointProperties.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/getReferenceValue.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/event-streams/EventStreamSerde.d.ts +14 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +7 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/retries-2026-config.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/parse-utils.d.ts +5 -5
- package/node_modules/@smithy/core/package.json +3 -11
- package/node_modules/@smithy/credential-provider-imds/package.json +4 -12
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -13
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +9 -2
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +9 -2
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/package.json +5 -13
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +9 -9
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +9 -9
- package/node_modules/@smithy/signature-v4/package.json +4 -12
- package/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +14 -14
- package/node_modules/@smithy/types/package.json +29 -39
- package/package.json +2 -2
|
@@ -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 {
|
|
4
|
+
import { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
5
5
|
import { loadJsonRpcErrorCode } from "./parseJsonBody";
|
|
6
6
|
export class AwsJsonRpcProtocol extends RpcProtocol {
|
|
7
7
|
serializer;
|
|
@@ -18,7 +18,7 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
18
18
|
this.serviceTarget = serviceTarget;
|
|
19
19
|
this.codec =
|
|
20
20
|
jsonCodec ??
|
|
21
|
-
new
|
|
21
|
+
new JsonCodec2({
|
|
22
22
|
timestampFormat: {
|
|
23
23
|
useTrait: true,
|
|
24
24
|
default: 7,
|
|
@@ -1,14 +1,14 @@
|
|
|
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 {
|
|
4
|
+
import { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
5
5
|
import { loadRestJsonErrorCode } from "./parseJsonBody";
|
|
6
6
|
export class AwsRestJsonProtocol extends HttpBindingProtocol {
|
|
7
7
|
serializer;
|
|
8
8
|
deserializer;
|
|
9
9
|
codec;
|
|
10
10
|
mixin = new ProtocolLib();
|
|
11
|
-
constructor({ defaultNamespace, errorTypeRegistries, }) {
|
|
11
|
+
constructor({ defaultNamespace, errorTypeRegistries, jsonCodec, }) {
|
|
12
12
|
super({
|
|
13
13
|
defaultNamespace,
|
|
14
14
|
errorTypeRegistries,
|
|
@@ -21,7 +21,7 @@ export class AwsRestJsonProtocol extends HttpBindingProtocol {
|
|
|
21
21
|
httpBindings: true,
|
|
22
22
|
jsonName: true,
|
|
23
23
|
};
|
|
24
|
-
this.codec = new
|
|
24
|
+
this.codec = jsonCodec ?? new JsonCodec2(settings);
|
|
25
25
|
this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
|
|
26
26
|
this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
|
|
27
27
|
}
|
package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js
CHANGED
|
@@ -108,7 +108,7 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
108
108
|
}
|
|
109
109
|
return out;
|
|
110
110
|
}
|
|
111
|
-
if (value instanceof Uint8Array &&
|
|
111
|
+
if (value instanceof Uint8Array && ns.isBlobSchema()) {
|
|
112
112
|
if (ns === this.rootSchema) {
|
|
113
113
|
return value;
|
|
114
114
|
}
|
|
@@ -148,7 +148,7 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
148
148
|
}
|
|
149
149
|
return value;
|
|
150
150
|
}
|
|
151
|
-
if (typeof value === "number"
|
|
151
|
+
if (typeof value === "number") {
|
|
152
152
|
if (Math.abs(value) === Infinity || isNaN(value)) {
|
|
153
153
|
return String(value);
|
|
154
154
|
}
|
|
@@ -165,6 +165,9 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
165
165
|
}
|
|
166
166
|
if (ns.isDocumentSchema()) {
|
|
167
167
|
if (isObject) {
|
|
168
|
+
if (value instanceof Uint8Array) {
|
|
169
|
+
return (this.serdeContext?.base64Encoder ?? toBase64)(value);
|
|
170
|
+
}
|
|
168
171
|
const out = Array.isArray(value) ? [] : {};
|
|
169
172
|
for (const k in value) {
|
|
170
173
|
const v = value[k];
|
|
@@ -2,7 +2,6 @@ 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
4
|
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
5
|
-
import { writeKey } from "../../writeKey";
|
|
6
5
|
import { JsonBytesStringAdapter } from "./JsonBytesStringAdapter";
|
|
7
6
|
const encoder = new TextEncoder();
|
|
8
7
|
const OPEN_BRACE = 0x7b;
|
|
@@ -304,7 +303,7 @@ export class JsonShapeSerializer2 extends SerdeContextConfig {
|
|
|
304
303
|
return;
|
|
305
304
|
}
|
|
306
305
|
if (typeof value === "number") {
|
|
307
|
-
if (
|
|
306
|
+
if (Math.abs(value) === Infinity || Number.isNaN(value)) {
|
|
308
307
|
this.writeAsciiQuoted(String(value));
|
|
309
308
|
return;
|
|
310
309
|
}
|
|
@@ -396,7 +395,33 @@ export class JsonShapeSerializer2 extends SerdeContextConfig {
|
|
|
396
395
|
const valueSchema = ns.getValueSchema();
|
|
397
396
|
if (!isDocument) {
|
|
398
397
|
if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
|
|
399
|
-
|
|
398
|
+
let hasSpecials = false;
|
|
399
|
+
for (let i = 0; i < value.length; ++i) {
|
|
400
|
+
const v = value[i];
|
|
401
|
+
if (Number.isNaN(v) || v === Infinity || v === -Infinity || (v == null && !sparse)) {
|
|
402
|
+
hasSpecials = true;
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
let json;
|
|
407
|
+
if (!hasSpecials) {
|
|
408
|
+
json = JSON.stringify(value);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
const out = [];
|
|
412
|
+
for (let i = 0; i < value.length; ++i) {
|
|
413
|
+
const v = value[i];
|
|
414
|
+
if (v == null && !sparse)
|
|
415
|
+
continue;
|
|
416
|
+
if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
|
|
417
|
+
out.push(String(v));
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
out.push(v);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
json = JSON.stringify(out);
|
|
424
|
+
}
|
|
400
425
|
this.ensure(json.length * 3);
|
|
401
426
|
this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
|
|
402
427
|
return;
|
|
@@ -425,17 +450,22 @@ export class JsonShapeSerializer2 extends SerdeContextConfig {
|
|
|
425
450
|
const valueSchema = ns.getValueSchema();
|
|
426
451
|
if (!isDocument) {
|
|
427
452
|
if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
|
|
428
|
-
let
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
435
|
-
input[k] = value[k] ?? null;
|
|
453
|
+
let modifications;
|
|
454
|
+
for (const k in value) {
|
|
455
|
+
const v = value[k];
|
|
456
|
+
if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
|
|
457
|
+
(modifications ??= {})[k] = v;
|
|
458
|
+
value[k] = String(v);
|
|
436
459
|
}
|
|
460
|
+
else if (v === null && !sparse) {
|
|
461
|
+
(modifications ??= {})[k] = null;
|
|
462
|
+
value[k] = undefined;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
const json = JSON.stringify(value);
|
|
466
|
+
if (modifications) {
|
|
467
|
+
Object.assign(value, modifications);
|
|
437
468
|
}
|
|
438
|
-
const json = JSON.stringify(input);
|
|
439
469
|
this.ensure(json.length * 3);
|
|
440
470
|
this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
|
|
441
471
|
return;
|
|
@@ -4,25 +4,26 @@ export function jsonReviver(key, value, context) {
|
|
|
4
4
|
const numericString = context.source;
|
|
5
5
|
if (typeof value === "number") {
|
|
6
6
|
const inSafeRange = value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER;
|
|
7
|
-
if (
|
|
8
|
-
if (
|
|
7
|
+
if (inSafeRange) {
|
|
8
|
+
if (isRepresentable(numericString, value)) {
|
|
9
9
|
return value;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
return new NumericValue(numericString, "bigDecimal");
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
if (isFractionalBigNumeric(numericString)) {
|
|
12
15
|
return new NumericValue(numericString, "bigDecimal");
|
|
13
16
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return BigInt(Number(numericString));
|
|
17
|
-
}
|
|
18
|
-
return BigInt(numericString);
|
|
17
|
+
if (/[eE]/.test(numericString)) {
|
|
18
|
+
return expandExponentToBigInt(numericString);
|
|
19
19
|
}
|
|
20
|
+
return BigInt(numericString);
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
return value;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function isFractionalBigNumeric(s) {
|
|
26
27
|
const dotIndex = s.indexOf(".");
|
|
27
28
|
if (dotIndex === -1) {
|
|
28
29
|
return false;
|
|
@@ -35,3 +36,86 @@ function isFractionalNumeric(s) {
|
|
|
35
36
|
const exp = parseInt(s.slice(eIndex + 1), 10);
|
|
36
37
|
return exp < fracDigits;
|
|
37
38
|
}
|
|
39
|
+
function isRepresentable(numericString, value) {
|
|
40
|
+
if (numericString === String(value)) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
if (Object.is(value, -0)) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
if (/[eE]/.test(numericString)) {
|
|
47
|
+
return expandToDecimal(numericString) === expandToDecimal(String(value));
|
|
48
|
+
}
|
|
49
|
+
const normalized = numericString.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
50
|
+
const canonical = String(value);
|
|
51
|
+
if (normalized === canonical) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
if (/[eE]/.test(canonical)) {
|
|
55
|
+
return normalized === expandToDecimal(canonical);
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
function expandToDecimal(s) {
|
|
60
|
+
const negative = s.startsWith("-");
|
|
61
|
+
const abs = negative ? s.slice(1) : s;
|
|
62
|
+
const eIndex = abs.search(/[eE]/);
|
|
63
|
+
let result;
|
|
64
|
+
if (eIndex === -1) {
|
|
65
|
+
result = abs;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
const exp = parseInt(abs.slice(eIndex + 1), 10);
|
|
69
|
+
const mantissa = abs.slice(0, eIndex);
|
|
70
|
+
const dotIndex = mantissa.indexOf(".");
|
|
71
|
+
let digits;
|
|
72
|
+
let intLen;
|
|
73
|
+
if (dotIndex === -1) {
|
|
74
|
+
digits = mantissa;
|
|
75
|
+
intLen = mantissa.length;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
|
|
79
|
+
intLen = dotIndex;
|
|
80
|
+
}
|
|
81
|
+
digits = digits.replace(/0+$/, "") || "0";
|
|
82
|
+
const newDotPos = intLen + exp;
|
|
83
|
+
if (digits === "0") {
|
|
84
|
+
result = "0";
|
|
85
|
+
}
|
|
86
|
+
else if (newDotPos <= 0) {
|
|
87
|
+
result = "0." + "0".repeat(-newDotPos) + digits;
|
|
88
|
+
}
|
|
89
|
+
else if (newDotPos >= digits.length) {
|
|
90
|
+
result = digits + "0".repeat(newDotPos - digits.length);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
result = digits.slice(0, newDotPos) + "." + digits.slice(newDotPos);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (result.includes(".")) {
|
|
97
|
+
result = result.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
98
|
+
}
|
|
99
|
+
return (negative ? "-" : "") + result;
|
|
100
|
+
}
|
|
101
|
+
function expandExponentToBigInt(s) {
|
|
102
|
+
const eIndex = s.search(/[eE]/);
|
|
103
|
+
const exp = parseInt(s.slice(eIndex + 1), 10);
|
|
104
|
+
const negative = s.startsWith("-");
|
|
105
|
+
const mantissa = s.slice(negative ? 1 : 0, eIndex);
|
|
106
|
+
const dotIndex = mantissa.indexOf(".");
|
|
107
|
+
let digits;
|
|
108
|
+
let shift;
|
|
109
|
+
if (dotIndex === -1) {
|
|
110
|
+
digits = mantissa;
|
|
111
|
+
shift = exp;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
|
|
115
|
+
const fracDigits = mantissa.length - dotIndex - 1;
|
|
116
|
+
shift = exp - fracDigits;
|
|
117
|
+
}
|
|
118
|
+
digits = digits.replace(/0+$/, "") || "0";
|
|
119
|
+
const result = BigInt(digits) * 10n ** BigInt(shift + (mantissa.replace(".", "").length - digits.length));
|
|
120
|
+
return negative ? -result : result;
|
|
121
|
+
}
|
|
@@ -147,15 +147,6 @@ export declare const partitionsInfo: {
|
|
|
147
147
|
};
|
|
148
148
|
regionRegex: string;
|
|
149
149
|
regions: {
|
|
150
|
-
"aws-cn-global": {
|
|
151
|
-
description: string;
|
|
152
|
-
};
|
|
153
|
-
"cn-north-1": {
|
|
154
|
-
description: string;
|
|
155
|
-
};
|
|
156
|
-
"cn-northwest-1": {
|
|
157
|
-
description: string;
|
|
158
|
-
};
|
|
159
150
|
"af-south-1"?: undefined;
|
|
160
151
|
"ap-east-1"?: undefined;
|
|
161
152
|
"ap-east-2"?: undefined;
|
|
@@ -191,6 +182,15 @@ export declare const partitionsInfo: {
|
|
|
191
182
|
"us-east-2"?: undefined;
|
|
192
183
|
"us-west-1"?: undefined;
|
|
193
184
|
"us-west-2"?: undefined;
|
|
185
|
+
"aws-cn-global": {
|
|
186
|
+
description: string;
|
|
187
|
+
};
|
|
188
|
+
"cn-north-1": {
|
|
189
|
+
description: string;
|
|
190
|
+
};
|
|
191
|
+
"cn-northwest-1": {
|
|
192
|
+
description: string;
|
|
193
|
+
};
|
|
194
194
|
"eusc-de-east-1"?: undefined;
|
|
195
195
|
"aws-iso-global"?: undefined;
|
|
196
196
|
"us-iso-east-1"?: undefined;
|
|
@@ -219,9 +219,6 @@ export declare const partitionsInfo: {
|
|
|
219
219
|
};
|
|
220
220
|
regionRegex: string;
|
|
221
221
|
regions: {
|
|
222
|
-
"eusc-de-east-1": {
|
|
223
|
-
description: string;
|
|
224
|
-
};
|
|
225
222
|
"af-south-1"?: undefined;
|
|
226
223
|
"ap-east-1"?: undefined;
|
|
227
224
|
"ap-east-2"?: undefined;
|
|
@@ -260,6 +257,9 @@ export declare const partitionsInfo: {
|
|
|
260
257
|
"aws-cn-global"?: undefined;
|
|
261
258
|
"cn-north-1"?: undefined;
|
|
262
259
|
"cn-northwest-1"?: undefined;
|
|
260
|
+
"eusc-de-east-1": {
|
|
261
|
+
description: string;
|
|
262
|
+
};
|
|
263
263
|
"aws-iso-global"?: undefined;
|
|
264
264
|
"us-iso-east-1"?: undefined;
|
|
265
265
|
"us-iso-west-1"?: undefined;
|
|
@@ -287,15 +287,6 @@ export declare const partitionsInfo: {
|
|
|
287
287
|
};
|
|
288
288
|
regionRegex: string;
|
|
289
289
|
regions: {
|
|
290
|
-
"aws-iso-global": {
|
|
291
|
-
description: string;
|
|
292
|
-
};
|
|
293
|
-
"us-iso-east-1": {
|
|
294
|
-
description: string;
|
|
295
|
-
};
|
|
296
|
-
"us-iso-west-1": {
|
|
297
|
-
description: string;
|
|
298
|
-
};
|
|
299
290
|
"af-south-1"?: undefined;
|
|
300
291
|
"ap-east-1"?: undefined;
|
|
301
292
|
"ap-east-2"?: undefined;
|
|
@@ -335,6 +326,15 @@ export declare const partitionsInfo: {
|
|
|
335
326
|
"cn-north-1"?: undefined;
|
|
336
327
|
"cn-northwest-1"?: undefined;
|
|
337
328
|
"eusc-de-east-1"?: undefined;
|
|
329
|
+
"aws-iso-global": {
|
|
330
|
+
description: string;
|
|
331
|
+
};
|
|
332
|
+
"us-iso-east-1": {
|
|
333
|
+
description: string;
|
|
334
|
+
};
|
|
335
|
+
"us-iso-west-1": {
|
|
336
|
+
description: string;
|
|
337
|
+
};
|
|
338
338
|
"aws-iso-b-global"?: undefined;
|
|
339
339
|
"us-isob-east-1"?: undefined;
|
|
340
340
|
"us-isob-west-1"?: undefined;
|
|
@@ -359,15 +359,6 @@ export declare const partitionsInfo: {
|
|
|
359
359
|
};
|
|
360
360
|
regionRegex: string;
|
|
361
361
|
regions: {
|
|
362
|
-
"aws-iso-b-global": {
|
|
363
|
-
description: string;
|
|
364
|
-
};
|
|
365
|
-
"us-isob-east-1": {
|
|
366
|
-
description: string;
|
|
367
|
-
};
|
|
368
|
-
"us-isob-west-1": {
|
|
369
|
-
description: string;
|
|
370
|
-
};
|
|
371
362
|
"af-south-1"?: undefined;
|
|
372
363
|
"ap-east-1"?: undefined;
|
|
373
364
|
"ap-east-2"?: undefined;
|
|
@@ -410,6 +401,15 @@ export declare const partitionsInfo: {
|
|
|
410
401
|
"aws-iso-global"?: undefined;
|
|
411
402
|
"us-iso-east-1"?: undefined;
|
|
412
403
|
"us-iso-west-1"?: undefined;
|
|
404
|
+
"aws-iso-b-global": {
|
|
405
|
+
description: string;
|
|
406
|
+
};
|
|
407
|
+
"us-isob-east-1": {
|
|
408
|
+
description: string;
|
|
409
|
+
};
|
|
410
|
+
"us-isob-west-1": {
|
|
411
|
+
description: string;
|
|
412
|
+
};
|
|
413
413
|
"aws-iso-e-global"?: undefined;
|
|
414
414
|
"eu-isoe-west-1"?: undefined;
|
|
415
415
|
"aws-iso-f-global"?: undefined;
|
|
@@ -431,12 +431,6 @@ export declare const partitionsInfo: {
|
|
|
431
431
|
};
|
|
432
432
|
regionRegex: string;
|
|
433
433
|
regions: {
|
|
434
|
-
"aws-iso-e-global": {
|
|
435
|
-
description: string;
|
|
436
|
-
};
|
|
437
|
-
"eu-isoe-west-1": {
|
|
438
|
-
description: string;
|
|
439
|
-
};
|
|
440
434
|
"af-south-1"?: undefined;
|
|
441
435
|
"ap-east-1"?: undefined;
|
|
442
436
|
"ap-east-2"?: undefined;
|
|
@@ -482,6 +476,12 @@ export declare const partitionsInfo: {
|
|
|
482
476
|
"aws-iso-b-global"?: undefined;
|
|
483
477
|
"us-isob-east-1"?: undefined;
|
|
484
478
|
"us-isob-west-1"?: undefined;
|
|
479
|
+
"aws-iso-e-global": {
|
|
480
|
+
description: string;
|
|
481
|
+
};
|
|
482
|
+
"eu-isoe-west-1": {
|
|
483
|
+
description: string;
|
|
484
|
+
};
|
|
485
485
|
"aws-iso-f-global"?: undefined;
|
|
486
486
|
"us-isof-east-1"?: undefined;
|
|
487
487
|
"us-isof-south-1"?: undefined;
|
|
@@ -501,15 +501,6 @@ export declare const partitionsInfo: {
|
|
|
501
501
|
};
|
|
502
502
|
regionRegex: string;
|
|
503
503
|
regions: {
|
|
504
|
-
"aws-iso-f-global": {
|
|
505
|
-
description: string;
|
|
506
|
-
};
|
|
507
|
-
"us-isof-east-1": {
|
|
508
|
-
description: string;
|
|
509
|
-
};
|
|
510
|
-
"us-isof-south-1": {
|
|
511
|
-
description: string;
|
|
512
|
-
};
|
|
513
504
|
"af-south-1"?: undefined;
|
|
514
505
|
"ap-east-1"?: undefined;
|
|
515
506
|
"ap-east-2"?: undefined;
|
|
@@ -557,6 +548,15 @@ export declare const partitionsInfo: {
|
|
|
557
548
|
"us-isob-west-1"?: undefined;
|
|
558
549
|
"aws-iso-e-global"?: undefined;
|
|
559
550
|
"eu-isoe-west-1"?: undefined;
|
|
551
|
+
"aws-iso-f-global": {
|
|
552
|
+
description: string;
|
|
553
|
+
};
|
|
554
|
+
"us-isof-east-1": {
|
|
555
|
+
description: string;
|
|
556
|
+
};
|
|
557
|
+
"us-isof-south-1": {
|
|
558
|
+
description: string;
|
|
559
|
+
};
|
|
560
560
|
"aws-us-gov-global"?: undefined;
|
|
561
561
|
"us-gov-east-1"?: undefined;
|
|
562
562
|
"us-gov-west-1"?: undefined;
|
|
@@ -573,15 +573,6 @@ export declare const partitionsInfo: {
|
|
|
573
573
|
};
|
|
574
574
|
regionRegex: string;
|
|
575
575
|
regions: {
|
|
576
|
-
"aws-us-gov-global": {
|
|
577
|
-
description: string;
|
|
578
|
-
};
|
|
579
|
-
"us-gov-east-1": {
|
|
580
|
-
description: string;
|
|
581
|
-
};
|
|
582
|
-
"us-gov-west-1": {
|
|
583
|
-
description: string;
|
|
584
|
-
};
|
|
585
576
|
"af-south-1"?: undefined;
|
|
586
577
|
"ap-east-1"?: undefined;
|
|
587
578
|
"ap-east-2"?: undefined;
|
|
@@ -632,6 +623,15 @@ export declare const partitionsInfo: {
|
|
|
632
623
|
"aws-iso-f-global"?: undefined;
|
|
633
624
|
"us-isof-east-1"?: undefined;
|
|
634
625
|
"us-isof-south-1"?: undefined;
|
|
626
|
+
"aws-us-gov-global": {
|
|
627
|
+
description: string;
|
|
628
|
+
};
|
|
629
|
+
"us-gov-east-1": {
|
|
630
|
+
description: string;
|
|
631
|
+
};
|
|
632
|
+
"us-gov-west-1": {
|
|
633
|
+
description: string;
|
|
634
|
+
};
|
|
635
635
|
};
|
|
636
636
|
})[];
|
|
637
637
|
version: string;
|
|
@@ -24,4 +24,4 @@ export declare const fallback: {
|
|
|
24
24
|
* @internal
|
|
25
25
|
* @deprecated use createDefaultUserAgentProvider
|
|
26
26
|
*/
|
|
27
|
-
export declare const defaultUserAgent:
|
|
27
|
+
export declare const defaultUserAgent: typeof createDefaultUserAgentProvider;
|
|
@@ -15,4 +15,4 @@ export declare const createDefaultUserAgentProvider: ({ serviceId, clientVersion
|
|
|
15
15
|
* @internal
|
|
16
16
|
* @deprecated use createDefaultUserAgentProvider
|
|
17
17
|
*/
|
|
18
|
-
export declare const defaultUserAgent:
|
|
18
|
+
export declare const defaultUserAgent: typeof createDefaultUserAgentProvider;
|
|
@@ -25,4 +25,4 @@ export declare const createDefaultUserAgentProvider: ({ serviceId, clientVersion
|
|
|
25
25
|
* @internal
|
|
26
26
|
* @deprecated use createDefaultUserAgentProvider
|
|
27
27
|
*/
|
|
28
|
-
export declare const defaultUserAgent:
|
|
28
|
+
export declare const defaultUserAgent: typeof createDefaultUserAgentProvider;
|
package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TypeRegistry } from "@smithy/core/schema";
|
|
2
2
|
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
|
|
3
3
|
import type { JsonCodec } from "./codec-v1/JsonCodec";
|
|
4
|
+
import type { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
4
5
|
/**
|
|
5
6
|
* @public
|
|
6
7
|
* @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
|
|
@@ -11,7 +12,7 @@ export declare class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
|
|
|
11
12
|
errorTypeRegistries?: TypeRegistry[];
|
|
12
13
|
serviceTarget: string;
|
|
13
14
|
awsQueryCompatible?: boolean;
|
|
14
|
-
jsonCodec?: JsonCodec;
|
|
15
|
+
jsonCodec?: JsonCodec | JsonCodec2;
|
|
15
16
|
});
|
|
16
17
|
getShapeId(): string;
|
|
17
18
|
protected getJsonRpcVersion(): "1.0";
|
package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TypeRegistry } from "@smithy/core/schema";
|
|
2
2
|
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
|
|
3
3
|
import type { JsonCodec } from "./codec-v1/JsonCodec";
|
|
4
|
+
import type { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
4
5
|
/**
|
|
5
6
|
* @public
|
|
6
7
|
* @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
|
|
@@ -11,7 +12,7 @@ export declare class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
|
|
|
11
12
|
errorTypeRegistries?: TypeRegistry[];
|
|
12
13
|
serviceTarget: string;
|
|
13
14
|
awsQueryCompatible?: boolean;
|
|
14
|
-
jsonCodec?: JsonCodec;
|
|
15
|
+
jsonCodec?: JsonCodec | JsonCodec2;
|
|
15
16
|
});
|
|
16
17
|
getShapeId(): string;
|
|
17
18
|
protected getJsonRpcVersion(): "1.1";
|
package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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 "./codec-v1/JsonCodec";
|
|
4
|
+
import type { JsonCodec } from "./codec-v1/JsonCodec";
|
|
5
|
+
import { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
5
6
|
/**
|
|
6
7
|
* @public
|
|
7
8
|
*/
|
|
@@ -17,10 +18,10 @@ export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
17
18
|
errorTypeRegistries?: TypeRegistry[];
|
|
18
19
|
serviceTarget: string;
|
|
19
20
|
awsQueryCompatible?: boolean;
|
|
20
|
-
jsonCodec?: JsonCodec;
|
|
21
|
+
jsonCodec?: JsonCodec | JsonCodec2;
|
|
21
22
|
});
|
|
22
23
|
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<HttpRequest>;
|
|
23
|
-
getPayloadCodec(): JsonCodec;
|
|
24
|
+
getPayloadCodec(): JsonCodec | JsonCodec2;
|
|
24
25
|
protected abstract getJsonRpcVersion(): "1.1" | "1.0";
|
|
25
26
|
/**
|
|
26
27
|
* @override
|
package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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 "./codec-v1/JsonCodec";
|
|
4
|
+
import type { JsonCodec } from "./codec-v1/JsonCodec";
|
|
5
|
+
import { JsonCodec2 } from "./codec-v2/JsonCodec2";
|
|
5
6
|
/**
|
|
6
7
|
* @public
|
|
7
8
|
*/
|
|
@@ -10,12 +11,13 @@ export declare class AwsRestJsonProtocol extends HttpBindingProtocol {
|
|
|
10
11
|
protected deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
11
12
|
private readonly codec;
|
|
12
13
|
private readonly mixin;
|
|
13
|
-
constructor({ defaultNamespace, errorTypeRegistries, }: {
|
|
14
|
+
constructor({ defaultNamespace, errorTypeRegistries, jsonCodec, }: {
|
|
14
15
|
defaultNamespace: string;
|
|
15
16
|
errorTypeRegistries?: TypeRegistry[];
|
|
17
|
+
jsonCodec?: JsonCodec | JsonCodec2;
|
|
16
18
|
});
|
|
17
19
|
getShapeId(): string;
|
|
18
|
-
getPayloadCodec(): JsonCodec;
|
|
20
|
+
getPayloadCodec(): JsonCodec | JsonCodec2;
|
|
19
21
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
20
22
|
/**
|
|
21
23
|
* @override
|