@aws-sdk/core 3.940.0 → 3.946.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist-cjs/index.js +164 -109
  2. package/dist-cjs/submodules/protocols/index.js +164 -109
  3. package/dist-es/submodules/protocols/ProtocolLib.js +20 -3
  4. package/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js +11 -3
  5. package/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +2 -1
  6. package/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +2 -1
  7. package/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +14 -11
  8. package/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +30 -26
  9. package/dist-es/submodules/protocols/json/JsonShapeSerializer.js +75 -53
  10. package/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -8
  11. package/dist-es/submodules/protocols/structIterator.js +5 -3
  12. package/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +3 -1
  13. package/dist-types/submodules/protocols/ProtocolLib.d.ts +6 -0
  14. package/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +3 -1
  15. package/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +3 -1
  16. package/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -1
  17. package/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
  18. package/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +12 -3
  19. package/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +4 -0
  20. package/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +3 -0
  21. package/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +3 -0
  22. package/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -0
  23. package/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
  24. package/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +9 -3
  25. package/package.json +3 -3
@@ -21,38 +21,40 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
21
21
  _read(schema, value) {
22
22
  const isObject = value !== null && typeof value === "object";
23
23
  const ns = NormalizedSchema.of(schema);
24
- if (ns.isListSchema() && Array.isArray(value)) {
25
- const listMember = ns.getValueSchema();
26
- const out = [];
27
- const sparse = !!ns.getMergedTraits().sparse;
28
- for (const item of value) {
29
- if (sparse || item != null) {
30
- out.push(this._read(listMember, item));
24
+ if (isObject) {
25
+ if (ns.isStructSchema()) {
26
+ const out = {};
27
+ for (const [memberName, memberSchema] of deserializingStructIterator(ns, value, this.settings.jsonName ? "jsonName" : false)) {
28
+ const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;
29
+ const deserializedValue = this._read(memberSchema, value[fromKey]);
30
+ if (deserializedValue != null) {
31
+ out[memberName] = deserializedValue;
32
+ }
31
33
  }
34
+ return out;
32
35
  }
33
- return out;
34
- }
35
- else if (ns.isMapSchema() && isObject) {
36
- const mapMember = ns.getValueSchema();
37
- const out = {};
38
- const sparse = !!ns.getMergedTraits().sparse;
39
- for (const [_k, _v] of Object.entries(value)) {
40
- if (sparse || _v != null) {
41
- out[_k] = this._read(mapMember, _v);
36
+ if (Array.isArray(value) && ns.isListSchema()) {
37
+ const listMember = ns.getValueSchema();
38
+ const out = [];
39
+ const sparse = !!ns.getMergedTraits().sparse;
40
+ for (const item of value) {
41
+ if (sparse || item != null) {
42
+ out.push(this._read(listMember, item));
43
+ }
42
44
  }
45
+ return out;
43
46
  }
44
- return out;
45
- }
46
- else if (ns.isStructSchema() && isObject) {
47
- const out = {};
48
- for (const [memberName, memberSchema] of deserializingStructIterator(ns, value, this.settings.jsonName ? "jsonName" : false)) {
49
- const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;
50
- const deserializedValue = this._read(memberSchema, value[fromKey]);
51
- if (deserializedValue != null) {
52
- out[memberName] = deserializedValue;
47
+ if (ns.isMapSchema()) {
48
+ const mapMember = ns.getValueSchema();
49
+ const out = {};
50
+ const sparse = !!ns.getMergedTraits().sparse;
51
+ for (const [_k, _v] of Object.entries(value)) {
52
+ if (sparse || _v != null) {
53
+ out[_k] = this._read(mapMember, _v);
54
+ }
53
55
  }
56
+ return out;
54
57
  }
55
- return out;
56
58
  }
57
59
  if (ns.isBlobSchema() && typeof value === "string") {
58
60
  return fromBase64(value);
@@ -63,6 +65,7 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
63
65
  if (isJson) {
64
66
  return LazyJsonString.from(value);
65
67
  }
68
+ return value;
66
69
  }
67
70
  if (ns.isTimestampSchema() && value != null) {
68
71
  const format = determineTimestampFormat(ns, this.settings);
@@ -100,6 +103,7 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
100
103
  case "NaN":
101
104
  return NaN;
102
105
  }
106
+ return value;
103
107
  }
104
108
  if (ns.isDocumentSchema()) {
105
109
  if (isObject) {
@@ -8,6 +8,7 @@ import { JsonReplacer } from "./jsonReplacer";
8
8
  export class JsonShapeSerializer extends SerdeContextConfig {
9
9
  settings;
10
10
  buffer;
11
+ useReplacer = false;
11
12
  rootSchema;
12
13
  constructor(settings) {
13
14
  super();
@@ -24,9 +25,13 @@ export class JsonShapeSerializer extends SerdeContextConfig {
24
25
  }
25
26
  }
26
27
  flush() {
27
- const { rootSchema } = this;
28
+ const { rootSchema, useReplacer } = this;
28
29
  this.rootSchema = undefined;
30
+ this.useReplacer = false;
29
31
  if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {
32
+ if (!useReplacer) {
33
+ return JSON.stringify(this.buffer);
34
+ }
30
35
  const replacer = new JsonReplacer();
31
36
  return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));
32
37
  }
@@ -35,68 +40,68 @@ export class JsonShapeSerializer extends SerdeContextConfig {
35
40
  _write(schema, value, container) {
36
41
  const isObject = value !== null && typeof value === "object";
37
42
  const ns = NormalizedSchema.of(schema);
38
- if (ns.isListSchema() && Array.isArray(value)) {
39
- const listMember = ns.getValueSchema();
40
- const out = [];
41
- const sparse = !!ns.getMergedTraits().sparse;
42
- for (const item of value) {
43
- if (sparse || item != null) {
44
- out.push(this._write(listMember, item));
43
+ if (isObject) {
44
+ if (ns.isStructSchema()) {
45
+ const out = {};
46
+ for (const [memberName, memberSchema] of serializingStructIterator(ns, value)) {
47
+ const serializableValue = this._write(memberSchema, value[memberName], ns);
48
+ if (serializableValue !== undefined) {
49
+ const jsonName = memberSchema.getMergedTraits().jsonName;
50
+ const targetKey = this.settings.jsonName ? jsonName ?? memberName : memberName;
51
+ out[targetKey] = serializableValue;
52
+ }
45
53
  }
54
+ return out;
46
55
  }
47
- return out;
48
- }
49
- else if (ns.isMapSchema() && isObject) {
50
- const mapMember = ns.getValueSchema();
51
- const out = {};
52
- const sparse = !!ns.getMergedTraits().sparse;
53
- for (const [_k, _v] of Object.entries(value)) {
54
- if (sparse || _v != null) {
55
- out[_k] = this._write(mapMember, _v);
56
+ if (Array.isArray(value) && ns.isListSchema()) {
57
+ const listMember = ns.getValueSchema();
58
+ const out = [];
59
+ const sparse = !!ns.getMergedTraits().sparse;
60
+ for (const item of value) {
61
+ if (sparse || item != null) {
62
+ out.push(this._write(listMember, item));
63
+ }
56
64
  }
65
+ return out;
57
66
  }
58
- return out;
59
- }
60
- else if (ns.isStructSchema() && isObject) {
61
- const out = {};
62
- for (const [memberName, memberSchema] of serializingStructIterator(ns, value)) {
63
- const serializableValue = this._write(memberSchema, value[memberName], ns);
64
- if (serializableValue !== undefined) {
65
- const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;
66
- out[targetKey] = serializableValue;
67
+ if (ns.isMapSchema()) {
68
+ const mapMember = ns.getValueSchema();
69
+ const out = {};
70
+ const sparse = !!ns.getMergedTraits().sparse;
71
+ for (const [_k, _v] of Object.entries(value)) {
72
+ if (sparse || _v != null) {
73
+ out[_k] = this._write(mapMember, _v);
74
+ }
67
75
  }
76
+ return out;
68
77
  }
69
- return out;
70
- }
71
- if (value === null && container?.isStructSchema()) {
72
- return void 0;
73
- }
74
- if ((ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string")) ||
75
- (ns.isDocumentSchema() && value instanceof Uint8Array)) {
76
- if (ns === this.rootSchema) {
77
- return value;
78
+ if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {
79
+ if (ns === this.rootSchema) {
80
+ return value;
81
+ }
82
+ return (this.serdeContext?.base64Encoder ?? toBase64)(value);
78
83
  }
79
- return (this.serdeContext?.base64Encoder ?? toBase64)(value);
80
- }
81
- if ((ns.isTimestampSchema() || ns.isDocumentSchema()) && value instanceof Date) {
82
- const format = determineTimestampFormat(ns, this.settings);
83
- switch (format) {
84
- case 5:
85
- return value.toISOString().replace(".000Z", "Z");
86
- case 6:
87
- return dateToUtcString(value);
88
- case 7:
89
- return value.getTime() / 1000;
90
- default:
91
- console.warn("Missing timestamp format, using epoch seconds", value);
92
- return value.getTime() / 1000;
84
+ if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
85
+ const format = determineTimestampFormat(ns, this.settings);
86
+ switch (format) {
87
+ case 5:
88
+ return value.toISOString().replace(".000Z", "Z");
89
+ case 6:
90
+ return dateToUtcString(value);
91
+ case 7:
92
+ return value.getTime() / 1000;
93
+ default:
94
+ console.warn("Missing timestamp format, using epoch seconds", value);
95
+ return value.getTime() / 1000;
96
+ }
93
97
  }
94
- }
95
- if (ns.isNumericSchema() && typeof value === "number") {
96
- if (Math.abs(value) === Infinity || isNaN(value)) {
97
- return String(value);
98
+ if (value instanceof NumericValue) {
99
+ this.useReplacer = true;
98
100
  }
99
101
  }
102
+ if (value === null && container?.isStructSchema()) {
103
+ return void 0;
104
+ }
100
105
  if (ns.isStringSchema()) {
101
106
  if (typeof value === "undefined" && ns.isIdempotencyToken()) {
102
107
  return generateIdempotencyToken();
@@ -108,12 +113,29 @@ export class JsonShapeSerializer extends SerdeContextConfig {
108
113
  return LazyJsonString.from(value);
109
114
  }
110
115
  }
116
+ return value;
117
+ }
118
+ if (typeof value === "number" && ns.isNumericSchema()) {
119
+ if (Math.abs(value) === Infinity || isNaN(value)) {
120
+ return String(value);
121
+ }
122
+ return value;
123
+ }
124
+ if (typeof value === "string" && ns.isBlobSchema()) {
125
+ if (ns === this.rootSchema) {
126
+ return value;
127
+ }
128
+ return (this.serdeContext?.base64Encoder ?? toBase64)(value);
129
+ }
130
+ if (typeof value === "bigint") {
131
+ this.useReplacer = true;
111
132
  }
112
133
  if (ns.isDocumentSchema()) {
113
134
  if (isObject) {
114
135
  const out = Array.isArray(value) ? [] : {};
115
136
  for (const [k, v] of Object.entries(value)) {
116
137
  if (v instanceof NumericValue) {
138
+ this.useReplacer = true;
117
139
  out[k] = v;
118
140
  }
119
141
  else {
@@ -95,18 +95,13 @@ export class AwsQueryProtocol extends RpcProtocol {
95
95
  Code: errorData.Code,
96
96
  Message: message,
97
97
  };
98
- const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, (registry, errorName) => {
99
- try {
100
- return registry.getSchema(errorName);
101
- }
102
- catch (e) {
103
- return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);
104
- }
105
- });
98
+ const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);
106
99
  const ns = NormalizedSchema.of(errorSchema);
107
100
  const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;
108
101
  const exception = new ErrorCtor(message);
109
102
  const output = {
103
+ Type: errorData.Error.Type,
104
+ Code: errorData.Error.Code,
110
105
  Error: errorData.Error,
111
106
  };
112
107
  for (const [name, member] of ns.structIterator()) {
@@ -6,7 +6,8 @@ export function* serializingStructIterator(ns, sourceObject) {
6
6
  const struct = ns.getSchema();
7
7
  for (let i = 0; i < struct[4].length; ++i) {
8
8
  const key = struct[4][i];
9
- const memberNs = new NormalizedSchema([struct[5][i], 0], key);
9
+ const memberSchema = struct[5][i];
10
+ const memberNs = new NormalizedSchema([memberSchema, 0], key);
10
11
  if (!(key in sourceObject) && !memberNs.isIdempotencyToken()) {
11
12
  continue;
12
13
  }
@@ -18,13 +19,14 @@ export function* deserializingStructIterator(ns, sourceObject, nameTrait) {
18
19
  return;
19
20
  }
20
21
  const struct = ns.getSchema();
21
- let keysRemaining = Object.keys(sourceObject).length;
22
+ let keysRemaining = Object.keys(sourceObject).filter((k) => k !== "__type").length;
22
23
  for (let i = 0; i < struct[4].length; ++i) {
23
24
  if (keysRemaining === 0) {
24
25
  break;
25
26
  }
26
27
  const key = struct[4][i];
27
- const memberNs = new NormalizedSchema([struct[5][i], 0], key);
28
+ const memberSchema = struct[5][i];
29
+ const memberNs = new NormalizedSchema([memberSchema, 0], key);
28
30
  let serializationKey = key;
29
31
  if (nameTrait) {
30
32
  serializationKey = memberNs.getMergedTraits()[nameTrait] ?? key;
@@ -40,7 +40,9 @@ export class AwsRestXmlProtocol extends HttpBindingProtocol {
40
40
  }
41
41
  if (request.headers["content-type"] === this.getDefaultContentType()) {
42
42
  if (typeof request.body === "string") {
43
- request.body = '<?xml version="1.0" encoding="UTF-8"?>' + request.body;
43
+ if (!request.body.startsWith("<?xml ")) {
44
+ request.body = '<?xml version="1.0" encoding="UTF-8"?>' + request.body;
45
+ }
44
46
  }
45
47
  }
46
48
  return request;
@@ -51,5 +51,11 @@ export declare class ProtocolLib {
51
51
  * @param errorData - canonical error object returned to the caller.
52
52
  */
53
53
  queryCompatOutput(queryCompatErrorData: any, errorData: any): void;
54
+ /**
55
+ * Finds the canonical modeled error using the awsQueryError alias.
56
+ * @param registry - service error registry.
57
+ * @param errorName - awsQueryError name or regular qualified shapeId.
58
+ */
59
+ findQueryCompatibleError(registry: TypeRegistry, errorName: string): StaticErrorSchema;
54
60
  }
55
61
  export {};
@@ -1,13 +1,15 @@
1
1
  import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
2
+ import type { JsonCodec } from "./JsonCodec";
2
3
  /**
3
4
  * @public
4
5
  * @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
5
6
  */
6
7
  export declare class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
7
- constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }: {
8
+ constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }: {
8
9
  defaultNamespace: string;
9
10
  serviceTarget: string;
10
11
  awsQueryCompatible?: boolean;
12
+ jsonCodec?: JsonCodec;
11
13
  });
12
14
  getShapeId(): string;
13
15
  protected getJsonRpcVersion(): "1.0";
@@ -1,13 +1,15 @@
1
1
  import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
2
+ import type { JsonCodec } from "./JsonCodec";
2
3
  /**
3
4
  * @public
4
5
  * @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
5
6
  */
6
7
  export declare class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
7
- constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }: {
8
+ constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }: {
8
9
  defaultNamespace: string;
9
10
  serviceTarget: string;
10
11
  awsQueryCompatible?: boolean;
12
+ jsonCodec?: JsonCodec;
11
13
  });
12
14
  getShapeId(): string;
13
15
  protected getJsonRpcVersion(): "1.1";
@@ -11,10 +11,11 @@ export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
11
11
  private readonly codec;
12
12
  private readonly mixin;
13
13
  private readonly awsQueryCompatible;
14
- protected constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }: {
14
+ protected constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }: {
15
15
  defaultNamespace: string;
16
16
  serviceTarget: string;
17
17
  awsQueryCompatible?: boolean;
18
+ jsonCodec?: JsonCodec;
18
19
  });
19
20
  serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<HttpRequest>;
20
21
  getPayloadCodec(): JsonCodec;
@@ -9,5 +9,5 @@ export declare class JsonShapeDeserializer extends SerdeContextConfig implements
9
9
  constructor(settings: JsonSettings);
10
10
  read(schema: Schema, data: string | Uint8Array | unknown): Promise<any>;
11
11
  readObject(schema: Schema, data: DocumentType): any;
12
- private _read;
12
+ protected _read(schema: Schema, value: unknown): any;
13
13
  }
@@ -1,3 +1,4 @@
1
+ import { NormalizedSchema } from "@smithy/core/schema";
1
2
  import type { Schema, ShapeSerializer } from "@smithy/types";
2
3
  import { SerdeContextConfig } from "../ConfigurableSerdeContext";
3
4
  import type { JsonSettings } from "./JsonCodec";
@@ -6,8 +7,13 @@ import type { JsonSettings } from "./JsonCodec";
6
7
  */
7
8
  export declare class JsonShapeSerializer extends SerdeContextConfig implements ShapeSerializer<string> {
8
9
  readonly settings: JsonSettings;
9
- private buffer;
10
- private rootSchema;
10
+ /**
11
+ * Write buffer. Reused per value serialization pass.
12
+ * In the initial implementation, this is not an incremental buffer.
13
+ */
14
+ protected buffer: any;
15
+ protected useReplacer: boolean;
16
+ protected rootSchema: NormalizedSchema | undefined;
11
17
  constructor(settings: JsonSettings);
12
18
  write(schema: Schema, value: unknown): void;
13
19
  /**
@@ -15,5 +21,8 @@ export declare class JsonShapeSerializer extends SerdeContextConfig implements S
15
21
  */
16
22
  writeDiscriminatedDocument(schema: Schema, value: unknown): void;
17
23
  flush(): string;
18
- private _write;
24
+ /**
25
+ * Order if-statements by order of likelihood.
26
+ */
27
+ protected _write(schema: Schema, value: unknown, container?: NormalizedSchema): any;
19
28
  }
@@ -39,5 +39,9 @@ export declare class ProtocolLib {
39
39
  response: IHttpResponse
40
40
  ): void;
41
41
  queryCompatOutput(queryCompatErrorData: any, errorData: any): void;
42
+ findQueryCompatibleError(
43
+ registry: TypeRegistry,
44
+ errorName: string
45
+ ): StaticErrorSchema;
42
46
  }
43
47
  export {};
@@ -1,13 +1,16 @@
1
1
  import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
2
+ import { JsonCodec } from "./JsonCodec";
2
3
  export declare class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
3
4
  constructor({
4
5
  defaultNamespace,
5
6
  serviceTarget,
6
7
  awsQueryCompatible,
8
+ jsonCodec,
7
9
  }: {
8
10
  defaultNamespace: string;
9
11
  serviceTarget: string;
10
12
  awsQueryCompatible?: boolean;
13
+ jsonCodec?: JsonCodec;
11
14
  });
12
15
  getShapeId(): string;
13
16
  protected getJsonRpcVersion(): "1.0";
@@ -1,13 +1,16 @@
1
1
  import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
2
+ import { JsonCodec } from "./JsonCodec";
2
3
  export declare class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
3
4
  constructor({
4
5
  defaultNamespace,
5
6
  serviceTarget,
6
7
  awsQueryCompatible,
8
+ jsonCodec,
7
9
  }: {
8
10
  defaultNamespace: string;
9
11
  serviceTarget: string;
10
12
  awsQueryCompatible?: boolean;
13
+ jsonCodec?: JsonCodec;
11
14
  });
12
15
  getShapeId(): string;
13
16
  protected getJsonRpcVersion(): "1.1";
@@ -22,10 +22,12 @@ export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
22
22
  defaultNamespace,
23
23
  serviceTarget,
24
24
  awsQueryCompatible,
25
+ jsonCodec,
25
26
  }: {
26
27
  defaultNamespace: string;
27
28
  serviceTarget: string;
28
29
  awsQueryCompatible?: boolean;
30
+ jsonCodec?: JsonCodec;
29
31
  });
30
32
  serializeRequest<Input extends object>(
31
33
  operationSchema: OperationSchema,
@@ -9,5 +9,5 @@ export declare class JsonShapeDeserializer
9
9
  constructor(settings: JsonSettings);
10
10
  read(schema: Schema, data: string | Uint8Array | unknown): Promise<any>;
11
11
  readObject(schema: Schema, data: DocumentType): any;
12
- private _read;
12
+ protected _read(schema: Schema, value: unknown): any;
13
13
  }
@@ -1,3 +1,4 @@
1
+ import { NormalizedSchema } from "@smithy/core/schema";
1
2
  import { Schema, ShapeSerializer } from "@smithy/types";
2
3
  import { SerdeContextConfig } from "../ConfigurableSerdeContext";
3
4
  import { JsonSettings } from "./JsonCodec";
@@ -6,11 +7,16 @@ export declare class JsonShapeSerializer
6
7
  implements ShapeSerializer<string>
7
8
  {
8
9
  readonly settings: JsonSettings;
9
- private buffer;
10
- private rootSchema;
10
+ protected buffer: any;
11
+ protected useReplacer: boolean;
12
+ protected rootSchema: NormalizedSchema | undefined;
11
13
  constructor(settings: JsonSettings);
12
14
  write(schema: Schema, value: unknown): void;
13
15
  writeDiscriminatedDocument(schema: Schema, value: unknown): void;
14
16
  flush(): string;
15
- private _write;
17
+ protected _write(
18
+ schema: Schema,
19
+ value: unknown,
20
+ container?: NormalizedSchema
21
+ ): any;
16
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.940.0",
3
+ "version": "3.946.0",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "scripts": {
6
6
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
@@ -83,12 +83,12 @@
83
83
  "dependencies": {
84
84
  "@aws-sdk/types": "3.936.0",
85
85
  "@aws-sdk/xml-builder": "3.930.0",
86
- "@smithy/core": "^3.18.5",
86
+ "@smithy/core": "^3.18.7",
87
87
  "@smithy/node-config-provider": "^4.3.5",
88
88
  "@smithy/property-provider": "^4.2.5",
89
89
  "@smithy/protocol-http": "^5.3.5",
90
90
  "@smithy/signature-v4": "^5.3.5",
91
- "@smithy/smithy-client": "^4.9.8",
91
+ "@smithy/smithy-client": "^4.9.10",
92
92
  "@smithy/types": "^4.9.0",
93
93
  "@smithy/util-base64": "^4.3.0",
94
94
  "@smithy/util-middleware": "^4.2.5",