@aws-sdk/client-dynamodb-streams 3.118.1 → 3.128.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.
- package/CHANGELOG.md +27 -0
- package/dist-cjs/protocols/Aws_json1_0.js +45 -64
- package/dist-es/protocols/Aws_json1_0.js +37 -56
- package/package.json +26 -26
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-dynamodb-streams
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/client-dynamodb-streams
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @aws-sdk/client-dynamodb-streams
|
|
@@ -65,8 +65,7 @@ const deserializeAws_json1_0DescribeStreamCommandError = async (output, context)
|
|
|
65
65
|
body: await parseBody(output.body, context),
|
|
66
66
|
};
|
|
67
67
|
let response;
|
|
68
|
-
|
|
69
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
68
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
70
69
|
switch (errorCode) {
|
|
71
70
|
case "InternalServerError":
|
|
72
71
|
case "com.amazonaws.dynamodbstreams#InternalServerError":
|
|
@@ -76,10 +75,12 @@ const deserializeAws_json1_0DescribeStreamCommandError = async (output, context)
|
|
|
76
75
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
77
76
|
default:
|
|
78
77
|
const parsedBody = parsedOutput.body;
|
|
78
|
+
const $metadata = deserializeMetadata(output);
|
|
79
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
79
80
|
response = new DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException({
|
|
80
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
81
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
81
82
|
$fault: "client",
|
|
82
|
-
$metadata
|
|
83
|
+
$metadata,
|
|
83
84
|
});
|
|
84
85
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
85
86
|
}
|
|
@@ -104,8 +105,7 @@ const deserializeAws_json1_0GetRecordsCommandError = async (output, context) =>
|
|
|
104
105
|
body: await parseBody(output.body, context),
|
|
105
106
|
};
|
|
106
107
|
let response;
|
|
107
|
-
|
|
108
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
108
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
109
109
|
switch (errorCode) {
|
|
110
110
|
case "ExpiredIteratorException":
|
|
111
111
|
case "com.amazonaws.dynamodbstreams#ExpiredIteratorException":
|
|
@@ -124,10 +124,12 @@ const deserializeAws_json1_0GetRecordsCommandError = async (output, context) =>
|
|
|
124
124
|
throw await deserializeAws_json1_0TrimmedDataAccessExceptionResponse(parsedOutput, context);
|
|
125
125
|
default:
|
|
126
126
|
const parsedBody = parsedOutput.body;
|
|
127
|
+
const $metadata = deserializeMetadata(output);
|
|
128
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
127
129
|
response = new DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException({
|
|
128
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
130
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
129
131
|
$fault: "client",
|
|
130
|
-
$metadata
|
|
132
|
+
$metadata,
|
|
131
133
|
});
|
|
132
134
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
133
135
|
}
|
|
@@ -152,8 +154,7 @@ const deserializeAws_json1_0GetShardIteratorCommandError = async (output, contex
|
|
|
152
154
|
body: await parseBody(output.body, context),
|
|
153
155
|
};
|
|
154
156
|
let response;
|
|
155
|
-
|
|
156
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
157
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
157
158
|
switch (errorCode) {
|
|
158
159
|
case "InternalServerError":
|
|
159
160
|
case "com.amazonaws.dynamodbstreams#InternalServerError":
|
|
@@ -166,10 +167,12 @@ const deserializeAws_json1_0GetShardIteratorCommandError = async (output, contex
|
|
|
166
167
|
throw await deserializeAws_json1_0TrimmedDataAccessExceptionResponse(parsedOutput, context);
|
|
167
168
|
default:
|
|
168
169
|
const parsedBody = parsedOutput.body;
|
|
170
|
+
const $metadata = deserializeMetadata(output);
|
|
171
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
169
172
|
response = new DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException({
|
|
170
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
173
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
171
174
|
$fault: "client",
|
|
172
|
-
$metadata
|
|
175
|
+
$metadata,
|
|
173
176
|
});
|
|
174
177
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
175
178
|
}
|
|
@@ -194,8 +197,7 @@ const deserializeAws_json1_0ListStreamsCommandError = async (output, context) =>
|
|
|
194
197
|
body: await parseBody(output.body, context),
|
|
195
198
|
};
|
|
196
199
|
let response;
|
|
197
|
-
|
|
198
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
200
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
199
201
|
switch (errorCode) {
|
|
200
202
|
case "InternalServerError":
|
|
201
203
|
case "com.amazonaws.dynamodbstreams#InternalServerError":
|
|
@@ -205,10 +207,12 @@ const deserializeAws_json1_0ListStreamsCommandError = async (output, context) =>
|
|
|
205
207
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
206
208
|
default:
|
|
207
209
|
const parsedBody = parsedOutput.body;
|
|
210
|
+
const $metadata = deserializeMetadata(output);
|
|
211
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
208
212
|
response = new DynamoDBStreamsServiceException_1.DynamoDBStreamsServiceException({
|
|
209
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
213
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
210
214
|
$fault: "client",
|
|
211
|
-
$metadata
|
|
215
|
+
$metadata,
|
|
212
216
|
});
|
|
213
217
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
214
218
|
}
|
|
@@ -260,34 +264,30 @@ const deserializeAws_json1_0TrimmedDataAccessExceptionResponse = async (parsedOu
|
|
|
260
264
|
};
|
|
261
265
|
const serializeAws_json1_0DescribeStreamInput = (input, context) => {
|
|
262
266
|
return {
|
|
263
|
-
...(input.ExclusiveStartShardId
|
|
264
|
-
|
|
265
|
-
...(input.
|
|
266
|
-
...(input.StreamArn !== undefined && input.StreamArn !== null && { StreamArn: input.StreamArn }),
|
|
267
|
+
...(input.ExclusiveStartShardId != null && { ExclusiveStartShardId: input.ExclusiveStartShardId }),
|
|
268
|
+
...(input.Limit != null && { Limit: input.Limit }),
|
|
269
|
+
...(input.StreamArn != null && { StreamArn: input.StreamArn }),
|
|
267
270
|
};
|
|
268
271
|
};
|
|
269
272
|
const serializeAws_json1_0GetRecordsInput = (input, context) => {
|
|
270
273
|
return {
|
|
271
|
-
...(input.Limit
|
|
272
|
-
...(input.ShardIterator
|
|
274
|
+
...(input.Limit != null && { Limit: input.Limit }),
|
|
275
|
+
...(input.ShardIterator != null && { ShardIterator: input.ShardIterator }),
|
|
273
276
|
};
|
|
274
277
|
};
|
|
275
278
|
const serializeAws_json1_0GetShardIteratorInput = (input, context) => {
|
|
276
279
|
return {
|
|
277
|
-
...(input.SequenceNumber
|
|
278
|
-
|
|
279
|
-
...(input.
|
|
280
|
-
...(input.
|
|
281
|
-
input.ShardIteratorType !== null && { ShardIteratorType: input.ShardIteratorType }),
|
|
282
|
-
...(input.StreamArn !== undefined && input.StreamArn !== null && { StreamArn: input.StreamArn }),
|
|
280
|
+
...(input.SequenceNumber != null && { SequenceNumber: input.SequenceNumber }),
|
|
281
|
+
...(input.ShardId != null && { ShardId: input.ShardId }),
|
|
282
|
+
...(input.ShardIteratorType != null && { ShardIteratorType: input.ShardIteratorType }),
|
|
283
|
+
...(input.StreamArn != null && { StreamArn: input.StreamArn }),
|
|
283
284
|
};
|
|
284
285
|
};
|
|
285
286
|
const serializeAws_json1_0ListStreamsInput = (input, context) => {
|
|
286
287
|
return {
|
|
287
|
-
...(input.ExclusiveStartStreamArn
|
|
288
|
-
|
|
289
|
-
...(input.
|
|
290
|
-
...(input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName }),
|
|
288
|
+
...(input.ExclusiveStartStreamArn != null && { ExclusiveStartStreamArn: input.ExclusiveStartStreamArn }),
|
|
289
|
+
...(input.Limit != null && { Limit: input.Limit }),
|
|
290
|
+
...(input.TableName != null && { TableName: input.TableName }),
|
|
291
291
|
};
|
|
292
292
|
};
|
|
293
293
|
const deserializeAws_json1_0AttributeMap = (output, context) => {
|
|
@@ -359,7 +359,7 @@ const deserializeAws_json1_0BinarySetAttributeValue = (output, context) => {
|
|
|
359
359
|
};
|
|
360
360
|
const deserializeAws_json1_0DescribeStreamOutput = (output, context) => {
|
|
361
361
|
return {
|
|
362
|
-
StreamDescription: output.StreamDescription
|
|
362
|
+
StreamDescription: output.StreamDescription != null
|
|
363
363
|
? deserializeAws_json1_0StreamDescription(output.StreamDescription, context)
|
|
364
364
|
: undefined,
|
|
365
365
|
};
|
|
@@ -372,9 +372,7 @@ const deserializeAws_json1_0ExpiredIteratorException = (output, context) => {
|
|
|
372
372
|
const deserializeAws_json1_0GetRecordsOutput = (output, context) => {
|
|
373
373
|
return {
|
|
374
374
|
NextShardIterator: (0, smithy_client_1.expectString)(output.NextShardIterator),
|
|
375
|
-
Records: output.Records
|
|
376
|
-
? deserializeAws_json1_0RecordList(output.Records, context)
|
|
377
|
-
: undefined,
|
|
375
|
+
Records: output.Records != null ? deserializeAws_json1_0RecordList(output.Records, context) : undefined,
|
|
378
376
|
};
|
|
379
377
|
};
|
|
380
378
|
const deserializeAws_json1_0GetShardIteratorOutput = (output, context) => {
|
|
@@ -429,9 +427,7 @@ const deserializeAws_json1_0ListAttributeValue = (output, context) => {
|
|
|
429
427
|
const deserializeAws_json1_0ListStreamsOutput = (output, context) => {
|
|
430
428
|
return {
|
|
431
429
|
LastEvaluatedStreamArn: (0, smithy_client_1.expectString)(output.LastEvaluatedStreamArn),
|
|
432
|
-
Streams: output.Streams
|
|
433
|
-
? deserializeAws_json1_0StreamList(output.Streams, context)
|
|
434
|
-
: undefined,
|
|
430
|
+
Streams: output.Streams != null ? deserializeAws_json1_0StreamList(output.Streams, context) : undefined,
|
|
435
431
|
};
|
|
436
432
|
};
|
|
437
433
|
const deserializeAws_json1_0MapAttributeValue = (output, context) => {
|
|
@@ -459,16 +455,12 @@ const deserializeAws_json1_0NumberSetAttributeValue = (output, context) => {
|
|
|
459
455
|
const deserializeAws_json1_0_Record = (output, context) => {
|
|
460
456
|
return {
|
|
461
457
|
awsRegion: (0, smithy_client_1.expectString)(output.awsRegion),
|
|
462
|
-
dynamodb: output.dynamodb
|
|
463
|
-
? deserializeAws_json1_0StreamRecord(output.dynamodb, context)
|
|
464
|
-
: undefined,
|
|
458
|
+
dynamodb: output.dynamodb != null ? deserializeAws_json1_0StreamRecord(output.dynamodb, context) : undefined,
|
|
465
459
|
eventID: (0, smithy_client_1.expectString)(output.eventID),
|
|
466
460
|
eventName: (0, smithy_client_1.expectString)(output.eventName),
|
|
467
461
|
eventSource: (0, smithy_client_1.expectString)(output.eventSource),
|
|
468
462
|
eventVersion: (0, smithy_client_1.expectString)(output.eventVersion),
|
|
469
|
-
userIdentity: output.userIdentity
|
|
470
|
-
? deserializeAws_json1_0Identity(output.userIdentity, context)
|
|
471
|
-
: undefined,
|
|
463
|
+
userIdentity: output.userIdentity != null ? deserializeAws_json1_0Identity(output.userIdentity, context) : undefined,
|
|
472
464
|
};
|
|
473
465
|
};
|
|
474
466
|
const deserializeAws_json1_0RecordList = (output, context) => {
|
|
@@ -496,7 +488,7 @@ const deserializeAws_json1_0SequenceNumberRange = (output, context) => {
|
|
|
496
488
|
const deserializeAws_json1_0Shard = (output, context) => {
|
|
497
489
|
return {
|
|
498
490
|
ParentShardId: (0, smithy_client_1.expectString)(output.ParentShardId),
|
|
499
|
-
SequenceNumberRange: output.SequenceNumberRange
|
|
491
|
+
SequenceNumberRange: output.SequenceNumberRange != null
|
|
500
492
|
? deserializeAws_json1_0SequenceNumberRange(output.SequenceNumberRange, context)
|
|
501
493
|
: undefined,
|
|
502
494
|
ShardId: (0, smithy_client_1.expectString)(output.ShardId),
|
|
@@ -522,16 +514,12 @@ const deserializeAws_json1_0_Stream = (output, context) => {
|
|
|
522
514
|
};
|
|
523
515
|
const deserializeAws_json1_0StreamDescription = (output, context) => {
|
|
524
516
|
return {
|
|
525
|
-
CreationRequestDateTime: output.CreationRequestDateTime
|
|
517
|
+
CreationRequestDateTime: output.CreationRequestDateTime != null
|
|
526
518
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationRequestDateTime)))
|
|
527
519
|
: undefined,
|
|
528
|
-
KeySchema: output.KeySchema
|
|
529
|
-
? deserializeAws_json1_0KeySchema(output.KeySchema, context)
|
|
530
|
-
: undefined,
|
|
520
|
+
KeySchema: output.KeySchema != null ? deserializeAws_json1_0KeySchema(output.KeySchema, context) : undefined,
|
|
531
521
|
LastEvaluatedShardId: (0, smithy_client_1.expectString)(output.LastEvaluatedShardId),
|
|
532
|
-
Shards: output.Shards
|
|
533
|
-
? deserializeAws_json1_0ShardDescriptionList(output.Shards, context)
|
|
534
|
-
: undefined,
|
|
522
|
+
Shards: output.Shards != null ? deserializeAws_json1_0ShardDescriptionList(output.Shards, context) : undefined,
|
|
535
523
|
StreamArn: (0, smithy_client_1.expectString)(output.StreamArn),
|
|
536
524
|
StreamLabel: (0, smithy_client_1.expectString)(output.StreamLabel),
|
|
537
525
|
StreamStatus: (0, smithy_client_1.expectString)(output.StreamStatus),
|
|
@@ -552,18 +540,12 @@ const deserializeAws_json1_0StreamList = (output, context) => {
|
|
|
552
540
|
};
|
|
553
541
|
const deserializeAws_json1_0StreamRecord = (output, context) => {
|
|
554
542
|
return {
|
|
555
|
-
ApproximateCreationDateTime: output.ApproximateCreationDateTime
|
|
543
|
+
ApproximateCreationDateTime: output.ApproximateCreationDateTime != null
|
|
556
544
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ApproximateCreationDateTime)))
|
|
557
545
|
: undefined,
|
|
558
|
-
Keys: output.Keys
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
NewImage: output.NewImage !== undefined && output.NewImage !== null
|
|
562
|
-
? deserializeAws_json1_0AttributeMap(output.NewImage, context)
|
|
563
|
-
: undefined,
|
|
564
|
-
OldImage: output.OldImage !== undefined && output.OldImage !== null
|
|
565
|
-
? deserializeAws_json1_0AttributeMap(output.OldImage, context)
|
|
566
|
-
: undefined,
|
|
546
|
+
Keys: output.Keys != null ? deserializeAws_json1_0AttributeMap(output.Keys, context) : undefined,
|
|
547
|
+
NewImage: output.NewImage != null ? deserializeAws_json1_0AttributeMap(output.NewImage, context) : undefined,
|
|
548
|
+
OldImage: output.OldImage != null ? deserializeAws_json1_0AttributeMap(output.OldImage, context) : undefined,
|
|
567
549
|
SequenceNumber: (0, smithy_client_1.expectString)(output.SequenceNumber),
|
|
568
550
|
SizeBytes: (0, smithy_client_1.expectLong)(output.SizeBytes),
|
|
569
551
|
StreamViewType: (0, smithy_client_1.expectString)(output.StreamViewType),
|
|
@@ -647,5 +629,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
647
629
|
if (data["__type"] !== undefined) {
|
|
648
630
|
return sanitizeErrorCode(data["__type"]);
|
|
649
631
|
}
|
|
650
|
-
return "";
|
|
651
632
|
};
|
|
@@ -66,7 +66,7 @@ export var deserializeAws_json1_0DescribeStreamCommand = function (output, conte
|
|
|
66
66
|
});
|
|
67
67
|
}); };
|
|
68
68
|
var deserializeAws_json1_0DescribeStreamCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
69
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
70
70
|
var _c;
|
|
71
71
|
return __generator(this, function (_d) {
|
|
72
72
|
switch (_d.label) {
|
|
@@ -76,7 +76,6 @@ var deserializeAws_json1_0DescribeStreamCommandError = function (output, context
|
|
|
76
76
|
return [4, parseBody(output.body, context)];
|
|
77
77
|
case 1:
|
|
78
78
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
79
|
-
errorCode = "UnknownError";
|
|
80
79
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
81
80
|
_b = errorCode;
|
|
82
81
|
switch (_b) {
|
|
@@ -92,10 +91,12 @@ var deserializeAws_json1_0DescribeStreamCommandError = function (output, context
|
|
|
92
91
|
case 5: throw _d.sent();
|
|
93
92
|
case 6:
|
|
94
93
|
parsedBody = parsedOutput.body;
|
|
94
|
+
$metadata = deserializeMetadata(output);
|
|
95
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
95
96
|
response = new __BaseException({
|
|
96
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
97
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
97
98
|
$fault: "client",
|
|
98
|
-
$metadata:
|
|
99
|
+
$metadata: $metadata,
|
|
99
100
|
});
|
|
100
101
|
throw __decorateServiceException(response, parsedBody);
|
|
101
102
|
}
|
|
@@ -120,7 +121,7 @@ export var deserializeAws_json1_0GetRecordsCommand = function (output, context)
|
|
|
120
121
|
});
|
|
121
122
|
}); };
|
|
122
123
|
var deserializeAws_json1_0GetRecordsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
123
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
124
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
124
125
|
var _c;
|
|
125
126
|
return __generator(this, function (_d) {
|
|
126
127
|
switch (_d.label) {
|
|
@@ -130,7 +131,6 @@ var deserializeAws_json1_0GetRecordsCommandError = function (output, context) {
|
|
|
130
131
|
return [4, parseBody(output.body, context)];
|
|
131
132
|
case 1:
|
|
132
133
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
133
|
-
errorCode = "UnknownError";
|
|
134
134
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
135
135
|
_b = errorCode;
|
|
136
136
|
switch (_b) {
|
|
@@ -158,10 +158,12 @@ var deserializeAws_json1_0GetRecordsCommandError = function (output, context) {
|
|
|
158
158
|
case 11: throw _d.sent();
|
|
159
159
|
case 12:
|
|
160
160
|
parsedBody = parsedOutput.body;
|
|
161
|
+
$metadata = deserializeMetadata(output);
|
|
162
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
161
163
|
response = new __BaseException({
|
|
162
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
164
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
163
165
|
$fault: "client",
|
|
164
|
-
$metadata:
|
|
166
|
+
$metadata: $metadata,
|
|
165
167
|
});
|
|
166
168
|
throw __decorateServiceException(response, parsedBody);
|
|
167
169
|
}
|
|
@@ -186,7 +188,7 @@ export var deserializeAws_json1_0GetShardIteratorCommand = function (output, con
|
|
|
186
188
|
});
|
|
187
189
|
}); };
|
|
188
190
|
var deserializeAws_json1_0GetShardIteratorCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
189
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
191
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
190
192
|
var _c;
|
|
191
193
|
return __generator(this, function (_d) {
|
|
192
194
|
switch (_d.label) {
|
|
@@ -196,7 +198,6 @@ var deserializeAws_json1_0GetShardIteratorCommandError = function (output, conte
|
|
|
196
198
|
return [4, parseBody(output.body, context)];
|
|
197
199
|
case 1:
|
|
198
200
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
199
|
-
errorCode = "UnknownError";
|
|
200
201
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
201
202
|
_b = errorCode;
|
|
202
203
|
switch (_b) {
|
|
@@ -216,10 +217,12 @@ var deserializeAws_json1_0GetShardIteratorCommandError = function (output, conte
|
|
|
216
217
|
case 7: throw _d.sent();
|
|
217
218
|
case 8:
|
|
218
219
|
parsedBody = parsedOutput.body;
|
|
220
|
+
$metadata = deserializeMetadata(output);
|
|
221
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
219
222
|
response = new __BaseException({
|
|
220
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
223
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
221
224
|
$fault: "client",
|
|
222
|
-
$metadata:
|
|
225
|
+
$metadata: $metadata,
|
|
223
226
|
});
|
|
224
227
|
throw __decorateServiceException(response, parsedBody);
|
|
225
228
|
}
|
|
@@ -244,7 +247,7 @@ export var deserializeAws_json1_0ListStreamsCommand = function (output, context)
|
|
|
244
247
|
});
|
|
245
248
|
}); };
|
|
246
249
|
var deserializeAws_json1_0ListStreamsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
247
|
-
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
250
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
|
|
248
251
|
var _c;
|
|
249
252
|
return __generator(this, function (_d) {
|
|
250
253
|
switch (_d.label) {
|
|
@@ -254,7 +257,6 @@ var deserializeAws_json1_0ListStreamsCommandError = function (output, context) {
|
|
|
254
257
|
return [4, parseBody(output.body, context)];
|
|
255
258
|
case 1:
|
|
256
259
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
257
|
-
errorCode = "UnknownError";
|
|
258
260
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
259
261
|
_b = errorCode;
|
|
260
262
|
switch (_b) {
|
|
@@ -270,10 +272,12 @@ var deserializeAws_json1_0ListStreamsCommandError = function (output, context) {
|
|
|
270
272
|
case 5: throw _d.sent();
|
|
271
273
|
case 6:
|
|
272
274
|
parsedBody = parsedOutput.body;
|
|
275
|
+
$metadata = deserializeMetadata(output);
|
|
276
|
+
statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
273
277
|
response = new __BaseException({
|
|
274
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
278
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
275
279
|
$fault: "client",
|
|
276
|
-
$metadata:
|
|
280
|
+
$metadata: $metadata,
|
|
277
281
|
});
|
|
278
282
|
throw __decorateServiceException(response, parsedBody);
|
|
279
283
|
}
|
|
@@ -325,20 +329,16 @@ var deserializeAws_json1_0TrimmedDataAccessExceptionResponse = function (parsedO
|
|
|
325
329
|
});
|
|
326
330
|
}); };
|
|
327
331
|
var serializeAws_json1_0DescribeStreamInput = function (input, context) {
|
|
328
|
-
return __assign(__assign(__assign({}, (input.ExclusiveStartShardId
|
|
329
|
-
input.ExclusiveStartShardId !== null && { ExclusiveStartShardId: input.ExclusiveStartShardId })), (input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit })), (input.StreamArn !== undefined && input.StreamArn !== null && { StreamArn: input.StreamArn }));
|
|
332
|
+
return __assign(__assign(__assign({}, (input.ExclusiveStartShardId != null && { ExclusiveStartShardId: input.ExclusiveStartShardId })), (input.Limit != null && { Limit: input.Limit })), (input.StreamArn != null && { StreamArn: input.StreamArn }));
|
|
330
333
|
};
|
|
331
334
|
var serializeAws_json1_0GetRecordsInput = function (input, context) {
|
|
332
|
-
return __assign(__assign({}, (input.Limit
|
|
335
|
+
return __assign(__assign({}, (input.Limit != null && { Limit: input.Limit })), (input.ShardIterator != null && { ShardIterator: input.ShardIterator }));
|
|
333
336
|
};
|
|
334
337
|
var serializeAws_json1_0GetShardIteratorInput = function (input, context) {
|
|
335
|
-
return __assign(__assign(__assign(__assign({}, (input.SequenceNumber
|
|
336
|
-
input.SequenceNumber !== null && { SequenceNumber: input.SequenceNumber })), (input.ShardId !== undefined && input.ShardId !== null && { ShardId: input.ShardId })), (input.ShardIteratorType !== undefined &&
|
|
337
|
-
input.ShardIteratorType !== null && { ShardIteratorType: input.ShardIteratorType })), (input.StreamArn !== undefined && input.StreamArn !== null && { StreamArn: input.StreamArn }));
|
|
338
|
+
return __assign(__assign(__assign(__assign({}, (input.SequenceNumber != null && { SequenceNumber: input.SequenceNumber })), (input.ShardId != null && { ShardId: input.ShardId })), (input.ShardIteratorType != null && { ShardIteratorType: input.ShardIteratorType })), (input.StreamArn != null && { StreamArn: input.StreamArn }));
|
|
338
339
|
};
|
|
339
340
|
var serializeAws_json1_0ListStreamsInput = function (input, context) {
|
|
340
|
-
return __assign(__assign(__assign({}, (input.ExclusiveStartStreamArn
|
|
341
|
-
input.ExclusiveStartStreamArn !== null && { ExclusiveStartStreamArn: input.ExclusiveStartStreamArn })), (input.Limit !== undefined && input.Limit !== null && { Limit: input.Limit })), (input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName }));
|
|
341
|
+
return __assign(__assign(__assign({}, (input.ExclusiveStartStreamArn != null && { ExclusiveStartStreamArn: input.ExclusiveStartStreamArn })), (input.Limit != null && { Limit: input.Limit })), (input.TableName != null && { TableName: input.TableName }));
|
|
342
342
|
};
|
|
343
343
|
var deserializeAws_json1_0AttributeMap = function (output, context) {
|
|
344
344
|
return Object.entries(output).reduce(function (acc, _a) {
|
|
@@ -408,7 +408,7 @@ var deserializeAws_json1_0BinarySetAttributeValue = function (output, context) {
|
|
|
408
408
|
};
|
|
409
409
|
var deserializeAws_json1_0DescribeStreamOutput = function (output, context) {
|
|
410
410
|
return {
|
|
411
|
-
StreamDescription: output.StreamDescription
|
|
411
|
+
StreamDescription: output.StreamDescription != null
|
|
412
412
|
? deserializeAws_json1_0StreamDescription(output.StreamDescription, context)
|
|
413
413
|
: undefined,
|
|
414
414
|
};
|
|
@@ -421,9 +421,7 @@ var deserializeAws_json1_0ExpiredIteratorException = function (output, context)
|
|
|
421
421
|
var deserializeAws_json1_0GetRecordsOutput = function (output, context) {
|
|
422
422
|
return {
|
|
423
423
|
NextShardIterator: __expectString(output.NextShardIterator),
|
|
424
|
-
Records: output.Records
|
|
425
|
-
? deserializeAws_json1_0RecordList(output.Records, context)
|
|
426
|
-
: undefined,
|
|
424
|
+
Records: output.Records != null ? deserializeAws_json1_0RecordList(output.Records, context) : undefined,
|
|
427
425
|
};
|
|
428
426
|
};
|
|
429
427
|
var deserializeAws_json1_0GetShardIteratorOutput = function (output, context) {
|
|
@@ -478,9 +476,7 @@ var deserializeAws_json1_0ListAttributeValue = function (output, context) {
|
|
|
478
476
|
var deserializeAws_json1_0ListStreamsOutput = function (output, context) {
|
|
479
477
|
return {
|
|
480
478
|
LastEvaluatedStreamArn: __expectString(output.LastEvaluatedStreamArn),
|
|
481
|
-
Streams: output.Streams
|
|
482
|
-
? deserializeAws_json1_0StreamList(output.Streams, context)
|
|
483
|
-
: undefined,
|
|
479
|
+
Streams: output.Streams != null ? deserializeAws_json1_0StreamList(output.Streams, context) : undefined,
|
|
484
480
|
};
|
|
485
481
|
};
|
|
486
482
|
var deserializeAws_json1_0MapAttributeValue = function (output, context) {
|
|
@@ -507,16 +503,12 @@ var deserializeAws_json1_0NumberSetAttributeValue = function (output, context) {
|
|
|
507
503
|
var deserializeAws_json1_0_Record = function (output, context) {
|
|
508
504
|
return {
|
|
509
505
|
awsRegion: __expectString(output.awsRegion),
|
|
510
|
-
dynamodb: output.dynamodb
|
|
511
|
-
? deserializeAws_json1_0StreamRecord(output.dynamodb, context)
|
|
512
|
-
: undefined,
|
|
506
|
+
dynamodb: output.dynamodb != null ? deserializeAws_json1_0StreamRecord(output.dynamodb, context) : undefined,
|
|
513
507
|
eventID: __expectString(output.eventID),
|
|
514
508
|
eventName: __expectString(output.eventName),
|
|
515
509
|
eventSource: __expectString(output.eventSource),
|
|
516
510
|
eventVersion: __expectString(output.eventVersion),
|
|
517
|
-
userIdentity: output.userIdentity
|
|
518
|
-
? deserializeAws_json1_0Identity(output.userIdentity, context)
|
|
519
|
-
: undefined,
|
|
511
|
+
userIdentity: output.userIdentity != null ? deserializeAws_json1_0Identity(output.userIdentity, context) : undefined,
|
|
520
512
|
};
|
|
521
513
|
};
|
|
522
514
|
var deserializeAws_json1_0RecordList = function (output, context) {
|
|
@@ -544,7 +536,7 @@ var deserializeAws_json1_0SequenceNumberRange = function (output, context) {
|
|
|
544
536
|
var deserializeAws_json1_0Shard = function (output, context) {
|
|
545
537
|
return {
|
|
546
538
|
ParentShardId: __expectString(output.ParentShardId),
|
|
547
|
-
SequenceNumberRange: output.SequenceNumberRange
|
|
539
|
+
SequenceNumberRange: output.SequenceNumberRange != null
|
|
548
540
|
? deserializeAws_json1_0SequenceNumberRange(output.SequenceNumberRange, context)
|
|
549
541
|
: undefined,
|
|
550
542
|
ShardId: __expectString(output.ShardId),
|
|
@@ -570,16 +562,12 @@ var deserializeAws_json1_0_Stream = function (output, context) {
|
|
|
570
562
|
};
|
|
571
563
|
var deserializeAws_json1_0StreamDescription = function (output, context) {
|
|
572
564
|
return {
|
|
573
|
-
CreationRequestDateTime: output.CreationRequestDateTime
|
|
565
|
+
CreationRequestDateTime: output.CreationRequestDateTime != null
|
|
574
566
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationRequestDateTime)))
|
|
575
567
|
: undefined,
|
|
576
|
-
KeySchema: output.KeySchema
|
|
577
|
-
? deserializeAws_json1_0KeySchema(output.KeySchema, context)
|
|
578
|
-
: undefined,
|
|
568
|
+
KeySchema: output.KeySchema != null ? deserializeAws_json1_0KeySchema(output.KeySchema, context) : undefined,
|
|
579
569
|
LastEvaluatedShardId: __expectString(output.LastEvaluatedShardId),
|
|
580
|
-
Shards: output.Shards
|
|
581
|
-
? deserializeAws_json1_0ShardDescriptionList(output.Shards, context)
|
|
582
|
-
: undefined,
|
|
570
|
+
Shards: output.Shards != null ? deserializeAws_json1_0ShardDescriptionList(output.Shards, context) : undefined,
|
|
583
571
|
StreamArn: __expectString(output.StreamArn),
|
|
584
572
|
StreamLabel: __expectString(output.StreamLabel),
|
|
585
573
|
StreamStatus: __expectString(output.StreamStatus),
|
|
@@ -600,18 +588,12 @@ var deserializeAws_json1_0StreamList = function (output, context) {
|
|
|
600
588
|
};
|
|
601
589
|
var deserializeAws_json1_0StreamRecord = function (output, context) {
|
|
602
590
|
return {
|
|
603
|
-
ApproximateCreationDateTime: output.ApproximateCreationDateTime
|
|
591
|
+
ApproximateCreationDateTime: output.ApproximateCreationDateTime != null
|
|
604
592
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ApproximateCreationDateTime)))
|
|
605
593
|
: undefined,
|
|
606
|
-
Keys: output.Keys
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
NewImage: output.NewImage !== undefined && output.NewImage !== null
|
|
610
|
-
? deserializeAws_json1_0AttributeMap(output.NewImage, context)
|
|
611
|
-
: undefined,
|
|
612
|
-
OldImage: output.OldImage !== undefined && output.OldImage !== null
|
|
613
|
-
? deserializeAws_json1_0AttributeMap(output.OldImage, context)
|
|
614
|
-
: undefined,
|
|
594
|
+
Keys: output.Keys != null ? deserializeAws_json1_0AttributeMap(output.Keys, context) : undefined,
|
|
595
|
+
NewImage: output.NewImage != null ? deserializeAws_json1_0AttributeMap(output.NewImage, context) : undefined,
|
|
596
|
+
OldImage: output.OldImage != null ? deserializeAws_json1_0AttributeMap(output.OldImage, context) : undefined,
|
|
615
597
|
SequenceNumber: __expectString(output.SequenceNumber),
|
|
616
598
|
SizeBytes: __expectLong(output.SizeBytes),
|
|
617
599
|
StreamViewType: __expectString(output.StreamViewType),
|
|
@@ -707,5 +689,4 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
707
689
|
if (data["__type"] !== undefined) {
|
|
708
690
|
return sanitizeErrorCode(data["__type"]);
|
|
709
691
|
}
|
|
710
|
-
return "";
|
|
711
692
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-dynamodb-streams",
|
|
3
3
|
"description": "AWS SDK for JavaScript Dynamodb Streams Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.128.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -18,35 +18,35 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
22
|
-
"@aws-sdk/config-resolver": "3.
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
25
|
-
"@aws-sdk/hash-node": "3.
|
|
26
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
27
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
28
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
29
|
-
"@aws-sdk/middleware-logger": "3.
|
|
30
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
31
|
-
"@aws-sdk/middleware-retry": "3.
|
|
32
|
-
"@aws-sdk/middleware-serde": "3.
|
|
33
|
-
"@aws-sdk/middleware-signing": "3.
|
|
34
|
-
"@aws-sdk/middleware-stack": "3.
|
|
35
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
36
|
-
"@aws-sdk/node-config-provider": "3.
|
|
37
|
-
"@aws-sdk/node-http-handler": "3.
|
|
38
|
-
"@aws-sdk/protocol-http": "3.
|
|
39
|
-
"@aws-sdk/smithy-client": "3.
|
|
40
|
-
"@aws-sdk/types": "3.
|
|
41
|
-
"@aws-sdk/url-parser": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.128.0",
|
|
22
|
+
"@aws-sdk/config-resolver": "3.128.0",
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.128.0",
|
|
24
|
+
"@aws-sdk/fetch-http-handler": "3.127.0",
|
|
25
|
+
"@aws-sdk/hash-node": "3.127.0",
|
|
26
|
+
"@aws-sdk/invalid-dependency": "3.127.0",
|
|
27
|
+
"@aws-sdk/middleware-content-length": "3.127.0",
|
|
28
|
+
"@aws-sdk/middleware-host-header": "3.127.0",
|
|
29
|
+
"@aws-sdk/middleware-logger": "3.127.0",
|
|
30
|
+
"@aws-sdk/middleware-recursion-detection": "3.127.0",
|
|
31
|
+
"@aws-sdk/middleware-retry": "3.127.0",
|
|
32
|
+
"@aws-sdk/middleware-serde": "3.127.0",
|
|
33
|
+
"@aws-sdk/middleware-signing": "3.128.0",
|
|
34
|
+
"@aws-sdk/middleware-stack": "3.127.0",
|
|
35
|
+
"@aws-sdk/middleware-user-agent": "3.127.0",
|
|
36
|
+
"@aws-sdk/node-config-provider": "3.127.0",
|
|
37
|
+
"@aws-sdk/node-http-handler": "3.127.0",
|
|
38
|
+
"@aws-sdk/protocol-http": "3.127.0",
|
|
39
|
+
"@aws-sdk/smithy-client": "3.127.0",
|
|
40
|
+
"@aws-sdk/types": "3.127.0",
|
|
41
|
+
"@aws-sdk/url-parser": "3.127.0",
|
|
42
42
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
43
43
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
44
44
|
"@aws-sdk/util-body-length-browser": "3.55.0",
|
|
45
45
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
46
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
48
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
49
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
46
|
+
"@aws-sdk/util-defaults-mode-browser": "3.127.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-node": "3.128.0",
|
|
48
|
+
"@aws-sdk/util-user-agent-browser": "3.127.0",
|
|
49
|
+
"@aws-sdk/util-user-agent-node": "3.127.0",
|
|
50
50
|
"@aws-sdk/util-utf8-browser": "3.109.0",
|
|
51
51
|
"@aws-sdk/util-utf8-node": "3.109.0",
|
|
52
52
|
"tslib": "^2.3.1"
|