@aws-sdk/client-kinesis 3.128.0 → 3.136.1

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 CHANGED
@@ -3,6 +3,36 @@
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.136.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.0...v3.136.1) (2022-07-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **client-kinesis:** support eventstream in subscribeToShard ([#3818](https://github.com/aws/aws-sdk-js-v3/issues/3818)) ([6892bb9](https://github.com/aws/aws-sdk-js-v3/commit/6892bb9057f46c650f19227d9e8b117f0d9c2b68))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/client-kinesis
20
+
21
+
22
+
23
+
24
+
25
+ # [3.130.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.129.0...v3.130.0) (2022-07-14)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **codegen:** fix error code parsing when it's a number ([#3371](https://github.com/aws/aws-sdk-js-v3/issues/3371)) ([c2d8522](https://github.com/aws/aws-sdk-js-v3/commit/c2d852279a3d23958521a6ceb4f4c642b0cb1848))
31
+
32
+
33
+
34
+
35
+
6
36
  # [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
7
37
 
8
38
  **Note:** Version bump only for package @aws-sdk/client-kinesis
@@ -1493,9 +1493,7 @@ const deserializeAws_json1_1SubscribeToShardCommand = async (output, context) =>
1493
1493
  if (output.statusCode >= 300) {
1494
1494
  return deserializeAws_json1_1SubscribeToShardCommandError(output, context);
1495
1495
  }
1496
- const data = await parseBody(output.body, context);
1497
- let contents = {};
1498
- contents = deserializeAws_json1_1SubscribeToShardOutput(data, context);
1496
+ const contents = { EventStream: deserializeAws_json1_1SubscribeToShardEventStream(output.body, context) };
1499
1497
  const response = {
1500
1498
  $metadata: deserializeMetadata(output),
1501
1499
  ...contents,
@@ -1753,6 +1751,139 @@ const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, c
1753
1751
  });
1754
1752
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1755
1753
  };
1754
+ const deserializeAws_json1_1SubscribeToShardEventStream = (output, context) => {
1755
+ return context.eventStreamMarshaller.deserialize(output, async (event) => {
1756
+ if (event["SubscribeToShardEvent"] != null) {
1757
+ return {
1758
+ SubscribeToShardEvent: await deserializeAws_json1_1SubscribeToShardEvent_event(event["SubscribeToShardEvent"], context),
1759
+ };
1760
+ }
1761
+ if (event["ResourceNotFoundException"] != null) {
1762
+ return {
1763
+ ResourceNotFoundException: await deserializeAws_json1_1ResourceNotFoundException_event(event["ResourceNotFoundException"], context),
1764
+ };
1765
+ }
1766
+ if (event["ResourceInUseException"] != null) {
1767
+ return {
1768
+ ResourceInUseException: await deserializeAws_json1_1ResourceInUseException_event(event["ResourceInUseException"], context),
1769
+ };
1770
+ }
1771
+ if (event["KMSDisabledException"] != null) {
1772
+ return {
1773
+ KMSDisabledException: await deserializeAws_json1_1KMSDisabledException_event(event["KMSDisabledException"], context),
1774
+ };
1775
+ }
1776
+ if (event["KMSInvalidStateException"] != null) {
1777
+ return {
1778
+ KMSInvalidStateException: await deserializeAws_json1_1KMSInvalidStateException_event(event["KMSInvalidStateException"], context),
1779
+ };
1780
+ }
1781
+ if (event["KMSAccessDeniedException"] != null) {
1782
+ return {
1783
+ KMSAccessDeniedException: await deserializeAws_json1_1KMSAccessDeniedException_event(event["KMSAccessDeniedException"], context),
1784
+ };
1785
+ }
1786
+ if (event["KMSNotFoundException"] != null) {
1787
+ return {
1788
+ KMSNotFoundException: await deserializeAws_json1_1KMSNotFoundException_event(event["KMSNotFoundException"], context),
1789
+ };
1790
+ }
1791
+ if (event["KMSOptInRequired"] != null) {
1792
+ return {
1793
+ KMSOptInRequired: await deserializeAws_json1_1KMSOptInRequired_event(event["KMSOptInRequired"], context),
1794
+ };
1795
+ }
1796
+ if (event["KMSThrottlingException"] != null) {
1797
+ return {
1798
+ KMSThrottlingException: await deserializeAws_json1_1KMSThrottlingException_event(event["KMSThrottlingException"], context),
1799
+ };
1800
+ }
1801
+ if (event["InternalFailureException"] != null) {
1802
+ return {
1803
+ InternalFailureException: await deserializeAws_json1_1InternalFailureException_event(event["InternalFailureException"], context),
1804
+ };
1805
+ }
1806
+ return { $unknown: output };
1807
+ });
1808
+ };
1809
+ const deserializeAws_json1_1InternalFailureException_event = async (output, context) => {
1810
+ const parsedOutput = {
1811
+ ...output,
1812
+ body: await parseBody(output.body, context),
1813
+ };
1814
+ return deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context);
1815
+ };
1816
+ const deserializeAws_json1_1KMSAccessDeniedException_event = async (output, context) => {
1817
+ const parsedOutput = {
1818
+ ...output,
1819
+ body: await parseBody(output.body, context),
1820
+ };
1821
+ return deserializeAws_json1_1KMSAccessDeniedExceptionResponse(parsedOutput, context);
1822
+ };
1823
+ const deserializeAws_json1_1KMSDisabledException_event = async (output, context) => {
1824
+ const parsedOutput = {
1825
+ ...output,
1826
+ body: await parseBody(output.body, context),
1827
+ };
1828
+ return deserializeAws_json1_1KMSDisabledExceptionResponse(parsedOutput, context);
1829
+ };
1830
+ const deserializeAws_json1_1KMSInvalidStateException_event = async (output, context) => {
1831
+ const parsedOutput = {
1832
+ ...output,
1833
+ body: await parseBody(output.body, context),
1834
+ };
1835
+ return deserializeAws_json1_1KMSInvalidStateExceptionResponse(parsedOutput, context);
1836
+ };
1837
+ const deserializeAws_json1_1KMSNotFoundException_event = async (output, context) => {
1838
+ const parsedOutput = {
1839
+ ...output,
1840
+ body: await parseBody(output.body, context),
1841
+ };
1842
+ return deserializeAws_json1_1KMSNotFoundExceptionResponse(parsedOutput, context);
1843
+ };
1844
+ const deserializeAws_json1_1KMSOptInRequired_event = async (output, context) => {
1845
+ const parsedOutput = {
1846
+ ...output,
1847
+ body: await parseBody(output.body, context),
1848
+ };
1849
+ return deserializeAws_json1_1KMSOptInRequiredResponse(parsedOutput, context);
1850
+ };
1851
+ const deserializeAws_json1_1KMSThrottlingException_event = async (output, context) => {
1852
+ const parsedOutput = {
1853
+ ...output,
1854
+ body: await parseBody(output.body, context),
1855
+ };
1856
+ return deserializeAws_json1_1KMSThrottlingExceptionResponse(parsedOutput, context);
1857
+ };
1858
+ const deserializeAws_json1_1ResourceInUseException_event = async (output, context) => {
1859
+ const parsedOutput = {
1860
+ ...output,
1861
+ body: await parseBody(output.body, context),
1862
+ };
1863
+ return deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
1864
+ };
1865
+ const deserializeAws_json1_1ResourceNotFoundException_event = async (output, context) => {
1866
+ const parsedOutput = {
1867
+ ...output,
1868
+ body: await parseBody(output.body, context),
1869
+ };
1870
+ return deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1871
+ };
1872
+ const deserializeAws_json1_1SubscribeToShardEvent_event = async (output, context) => {
1873
+ const contents = {};
1874
+ const data = await parseBody(output.body, context);
1875
+ Object.assign(contents, deserializeAws_json1_1SubscribeToShardEvent(data, context));
1876
+ return contents;
1877
+ };
1878
+ const deserializeAws_json1_1InternalFailureExceptionResponse = async (parsedOutput, context) => {
1879
+ const body = parsedOutput.body;
1880
+ const deserialized = deserializeAws_json1_1InternalFailureException(body, context);
1881
+ const exception = new models_0_1.InternalFailureException({
1882
+ $metadata: deserializeMetadata(parsedOutput),
1883
+ ...deserialized,
1884
+ });
1885
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
1886
+ };
1756
1887
  const serializeAws_json1_1AddTagsToStreamInput = (input, context) => {
1757
1888
  return {
1758
1889
  ...(input.StreamName != null && { StreamName: input.StreamName }),
@@ -2424,66 +2555,6 @@ const deserializeAws_json1_1SubscribeToShardEvent = (output, context) => {
2424
2555
  Records: output.Records != null ? deserializeAws_json1_1RecordList(output.Records, context) : undefined,
2425
2556
  };
2426
2557
  };
2427
- const deserializeAws_json1_1SubscribeToShardEventStream = (output, context) => {
2428
- if (output.InternalFailureException !== undefined && output.InternalFailureException !== null) {
2429
- return {
2430
- InternalFailureException: deserializeAws_json1_1InternalFailureException(output.InternalFailureException, context),
2431
- };
2432
- }
2433
- if (output.KMSAccessDeniedException !== undefined && output.KMSAccessDeniedException !== null) {
2434
- return {
2435
- KMSAccessDeniedException: deserializeAws_json1_1KMSAccessDeniedException(output.KMSAccessDeniedException, context),
2436
- };
2437
- }
2438
- if (output.KMSDisabledException !== undefined && output.KMSDisabledException !== null) {
2439
- return {
2440
- KMSDisabledException: deserializeAws_json1_1KMSDisabledException(output.KMSDisabledException, context),
2441
- };
2442
- }
2443
- if (output.KMSInvalidStateException !== undefined && output.KMSInvalidStateException !== null) {
2444
- return {
2445
- KMSInvalidStateException: deserializeAws_json1_1KMSInvalidStateException(output.KMSInvalidStateException, context),
2446
- };
2447
- }
2448
- if (output.KMSNotFoundException !== undefined && output.KMSNotFoundException !== null) {
2449
- return {
2450
- KMSNotFoundException: deserializeAws_json1_1KMSNotFoundException(output.KMSNotFoundException, context),
2451
- };
2452
- }
2453
- if (output.KMSOptInRequired !== undefined && output.KMSOptInRequired !== null) {
2454
- return {
2455
- KMSOptInRequired: deserializeAws_json1_1KMSOptInRequired(output.KMSOptInRequired, context),
2456
- };
2457
- }
2458
- if (output.KMSThrottlingException !== undefined && output.KMSThrottlingException !== null) {
2459
- return {
2460
- KMSThrottlingException: deserializeAws_json1_1KMSThrottlingException(output.KMSThrottlingException, context),
2461
- };
2462
- }
2463
- if (output.ResourceInUseException !== undefined && output.ResourceInUseException !== null) {
2464
- return {
2465
- ResourceInUseException: deserializeAws_json1_1ResourceInUseException(output.ResourceInUseException, context),
2466
- };
2467
- }
2468
- if (output.ResourceNotFoundException !== undefined && output.ResourceNotFoundException !== null) {
2469
- return {
2470
- ResourceNotFoundException: deserializeAws_json1_1ResourceNotFoundException(output.ResourceNotFoundException, context),
2471
- };
2472
- }
2473
- if (output.SubscribeToShardEvent !== undefined && output.SubscribeToShardEvent !== null) {
2474
- return {
2475
- SubscribeToShardEvent: deserializeAws_json1_1SubscribeToShardEvent(output.SubscribeToShardEvent, context),
2476
- };
2477
- }
2478
- return { $unknown: Object.entries(output)[0] };
2479
- };
2480
- const deserializeAws_json1_1SubscribeToShardOutput = (output, context) => {
2481
- return {
2482
- EventStream: output.EventStream != null
2483
- ? deserializeAws_json1_1SubscribeToShardEventStream((0, smithy_client_1.expectUnion)(output.EventStream), context)
2484
- : undefined,
2485
- };
2486
- };
2487
2558
  const deserializeAws_json1_1Tag = (output, context) => {
2488
2559
  return {
2489
2560
  Key: (0, smithy_client_1.expectString)(output.Key),
@@ -2557,6 +2628,9 @@ const loadRestJsonErrorCode = (output, data) => {
2557
2628
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2558
2629
  const sanitizeErrorCode = (rawValue) => {
2559
2630
  let cleanValue = rawValue;
2631
+ if (typeof cleanValue === "number") {
2632
+ cleanValue = cleanValue.toString();
2633
+ }
2560
2634
  if (cleanValue.indexOf(":") >= 0) {
2561
2635
  cleanValue = cleanValue.split(":")[0];
2562
2636
  }
@@ -1,8 +1,8 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, expectUnion as __expectUnion, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
4
4
  import { KinesisServiceException as __BaseException } from "../models/KinesisServiceException";
5
- import { ExpiredIteratorException, ExpiredNextTokenException, InvalidArgumentException, KMSAccessDeniedException, KMSDisabledException, KMSInvalidStateException, KMSNotFoundException, KMSOptInRequired, KMSThrottlingException, LimitExceededException, ProvisionedThroughputExceededException, ResourceInUseException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
5
+ import { ExpiredIteratorException, ExpiredNextTokenException, InternalFailureException, InvalidArgumentException, KMSAccessDeniedException, KMSDisabledException, KMSInvalidStateException, KMSNotFoundException, KMSOptInRequired, KMSThrottlingException, LimitExceededException, ProvisionedThroughputExceededException, ResourceInUseException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
6
6
  export var serializeAws_json1_1AddTagsToStreamCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
7
  var headers, body;
8
8
  return __generator(this, function (_a) {
@@ -2001,21 +2001,14 @@ var deserializeAws_json1_1StopStreamEncryptionCommandError = function (output, c
2001
2001
  });
2002
2002
  }); };
2003
2003
  export var deserializeAws_json1_1SubscribeToShardCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2004
- var data, contents, response;
2004
+ var contents, response;
2005
2005
  return __generator(this, function (_a) {
2006
- switch (_a.label) {
2007
- case 0:
2008
- if (output.statusCode >= 300) {
2009
- return [2, deserializeAws_json1_1SubscribeToShardCommandError(output, context)];
2010
- }
2011
- return [4, parseBody(output.body, context)];
2012
- case 1:
2013
- data = _a.sent();
2014
- contents = {};
2015
- contents = deserializeAws_json1_1SubscribeToShardOutput(data, context);
2016
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
2017
- return [2, Promise.resolve(response)];
2006
+ if (output.statusCode >= 300) {
2007
+ return [2, deserializeAws_json1_1SubscribeToShardCommandError(output, context)];
2018
2008
  }
2009
+ contents = { EventStream: deserializeAws_json1_1SubscribeToShardEventStream(output.body, context) };
2010
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
2011
+ return [2, Promise.resolve(response)];
2019
2012
  });
2020
2013
  }); };
2021
2014
  var deserializeAws_json1_1SubscribeToShardCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -2319,6 +2312,234 @@ var deserializeAws_json1_1ValidationExceptionResponse = function (parsedOutput,
2319
2312
  return [2, __decorateServiceException(exception, body)];
2320
2313
  });
2321
2314
  }); };
2315
+ var deserializeAws_json1_1SubscribeToShardEventStream = function (output, context) {
2316
+ return context.eventStreamMarshaller.deserialize(output, function (event) { return __awaiter(void 0, void 0, void 0, function () {
2317
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
2318
+ return __generator(this, function (_l) {
2319
+ switch (_l.label) {
2320
+ case 0:
2321
+ if (!(event["SubscribeToShardEvent"] != null)) return [3, 2];
2322
+ _a = {};
2323
+ return [4, deserializeAws_json1_1SubscribeToShardEvent_event(event["SubscribeToShardEvent"], context)];
2324
+ case 1: return [2, (_a.SubscribeToShardEvent = _l.sent(),
2325
+ _a)];
2326
+ case 2:
2327
+ if (!(event["ResourceNotFoundException"] != null)) return [3, 4];
2328
+ _b = {};
2329
+ return [4, deserializeAws_json1_1ResourceNotFoundException_event(event["ResourceNotFoundException"], context)];
2330
+ case 3: return [2, (_b.ResourceNotFoundException = _l.sent(),
2331
+ _b)];
2332
+ case 4:
2333
+ if (!(event["ResourceInUseException"] != null)) return [3, 6];
2334
+ _c = {};
2335
+ return [4, deserializeAws_json1_1ResourceInUseException_event(event["ResourceInUseException"], context)];
2336
+ case 5: return [2, (_c.ResourceInUseException = _l.sent(),
2337
+ _c)];
2338
+ case 6:
2339
+ if (!(event["KMSDisabledException"] != null)) return [3, 8];
2340
+ _d = {};
2341
+ return [4, deserializeAws_json1_1KMSDisabledException_event(event["KMSDisabledException"], context)];
2342
+ case 7: return [2, (_d.KMSDisabledException = _l.sent(),
2343
+ _d)];
2344
+ case 8:
2345
+ if (!(event["KMSInvalidStateException"] != null)) return [3, 10];
2346
+ _e = {};
2347
+ return [4, deserializeAws_json1_1KMSInvalidStateException_event(event["KMSInvalidStateException"], context)];
2348
+ case 9: return [2, (_e.KMSInvalidStateException = _l.sent(),
2349
+ _e)];
2350
+ case 10:
2351
+ if (!(event["KMSAccessDeniedException"] != null)) return [3, 12];
2352
+ _f = {};
2353
+ return [4, deserializeAws_json1_1KMSAccessDeniedException_event(event["KMSAccessDeniedException"], context)];
2354
+ case 11: return [2, (_f.KMSAccessDeniedException = _l.sent(),
2355
+ _f)];
2356
+ case 12:
2357
+ if (!(event["KMSNotFoundException"] != null)) return [3, 14];
2358
+ _g = {};
2359
+ return [4, deserializeAws_json1_1KMSNotFoundException_event(event["KMSNotFoundException"], context)];
2360
+ case 13: return [2, (_g.KMSNotFoundException = _l.sent(),
2361
+ _g)];
2362
+ case 14:
2363
+ if (!(event["KMSOptInRequired"] != null)) return [3, 16];
2364
+ _h = {};
2365
+ return [4, deserializeAws_json1_1KMSOptInRequired_event(event["KMSOptInRequired"], context)];
2366
+ case 15: return [2, (_h.KMSOptInRequired = _l.sent(),
2367
+ _h)];
2368
+ case 16:
2369
+ if (!(event["KMSThrottlingException"] != null)) return [3, 18];
2370
+ _j = {};
2371
+ return [4, deserializeAws_json1_1KMSThrottlingException_event(event["KMSThrottlingException"], context)];
2372
+ case 17: return [2, (_j.KMSThrottlingException = _l.sent(),
2373
+ _j)];
2374
+ case 18:
2375
+ if (!(event["InternalFailureException"] != null)) return [3, 20];
2376
+ _k = {};
2377
+ return [4, deserializeAws_json1_1InternalFailureException_event(event["InternalFailureException"], context)];
2378
+ case 19: return [2, (_k.InternalFailureException = _l.sent(),
2379
+ _k)];
2380
+ case 20: return [2, { $unknown: output }];
2381
+ }
2382
+ });
2383
+ }); });
2384
+ };
2385
+ var deserializeAws_json1_1InternalFailureException_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2386
+ var parsedOutput, _a;
2387
+ var _b;
2388
+ return __generator(this, function (_c) {
2389
+ switch (_c.label) {
2390
+ case 0:
2391
+ _a = [__assign({}, output)];
2392
+ _b = {};
2393
+ return [4, parseBody(output.body, context)];
2394
+ case 1:
2395
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
2396
+ return [2, deserializeAws_json1_1InternalFailureExceptionResponse(parsedOutput, context)];
2397
+ }
2398
+ });
2399
+ }); };
2400
+ var deserializeAws_json1_1KMSAccessDeniedException_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2401
+ var parsedOutput, _a;
2402
+ var _b;
2403
+ return __generator(this, function (_c) {
2404
+ switch (_c.label) {
2405
+ case 0:
2406
+ _a = [__assign({}, output)];
2407
+ _b = {};
2408
+ return [4, parseBody(output.body, context)];
2409
+ case 1:
2410
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
2411
+ return [2, deserializeAws_json1_1KMSAccessDeniedExceptionResponse(parsedOutput, context)];
2412
+ }
2413
+ });
2414
+ }); };
2415
+ var deserializeAws_json1_1KMSDisabledException_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2416
+ var parsedOutput, _a;
2417
+ var _b;
2418
+ return __generator(this, function (_c) {
2419
+ switch (_c.label) {
2420
+ case 0:
2421
+ _a = [__assign({}, output)];
2422
+ _b = {};
2423
+ return [4, parseBody(output.body, context)];
2424
+ case 1:
2425
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
2426
+ return [2, deserializeAws_json1_1KMSDisabledExceptionResponse(parsedOutput, context)];
2427
+ }
2428
+ });
2429
+ }); };
2430
+ var deserializeAws_json1_1KMSInvalidStateException_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2431
+ var parsedOutput, _a;
2432
+ var _b;
2433
+ return __generator(this, function (_c) {
2434
+ switch (_c.label) {
2435
+ case 0:
2436
+ _a = [__assign({}, output)];
2437
+ _b = {};
2438
+ return [4, parseBody(output.body, context)];
2439
+ case 1:
2440
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
2441
+ return [2, deserializeAws_json1_1KMSInvalidStateExceptionResponse(parsedOutput, context)];
2442
+ }
2443
+ });
2444
+ }); };
2445
+ var deserializeAws_json1_1KMSNotFoundException_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2446
+ var parsedOutput, _a;
2447
+ var _b;
2448
+ return __generator(this, function (_c) {
2449
+ switch (_c.label) {
2450
+ case 0:
2451
+ _a = [__assign({}, output)];
2452
+ _b = {};
2453
+ return [4, parseBody(output.body, context)];
2454
+ case 1:
2455
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
2456
+ return [2, deserializeAws_json1_1KMSNotFoundExceptionResponse(parsedOutput, context)];
2457
+ }
2458
+ });
2459
+ }); };
2460
+ var deserializeAws_json1_1KMSOptInRequired_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2461
+ var parsedOutput, _a;
2462
+ var _b;
2463
+ return __generator(this, function (_c) {
2464
+ switch (_c.label) {
2465
+ case 0:
2466
+ _a = [__assign({}, output)];
2467
+ _b = {};
2468
+ return [4, parseBody(output.body, context)];
2469
+ case 1:
2470
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
2471
+ return [2, deserializeAws_json1_1KMSOptInRequiredResponse(parsedOutput, context)];
2472
+ }
2473
+ });
2474
+ }); };
2475
+ var deserializeAws_json1_1KMSThrottlingException_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2476
+ var parsedOutput, _a;
2477
+ var _b;
2478
+ return __generator(this, function (_c) {
2479
+ switch (_c.label) {
2480
+ case 0:
2481
+ _a = [__assign({}, output)];
2482
+ _b = {};
2483
+ return [4, parseBody(output.body, context)];
2484
+ case 1:
2485
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
2486
+ return [2, deserializeAws_json1_1KMSThrottlingExceptionResponse(parsedOutput, context)];
2487
+ }
2488
+ });
2489
+ }); };
2490
+ var deserializeAws_json1_1ResourceInUseException_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2491
+ var parsedOutput, _a;
2492
+ var _b;
2493
+ return __generator(this, function (_c) {
2494
+ switch (_c.label) {
2495
+ case 0:
2496
+ _a = [__assign({}, output)];
2497
+ _b = {};
2498
+ return [4, parseBody(output.body, context)];
2499
+ case 1:
2500
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
2501
+ return [2, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
2502
+ }
2503
+ });
2504
+ }); };
2505
+ var deserializeAws_json1_1ResourceNotFoundException_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2506
+ var parsedOutput, _a;
2507
+ var _b;
2508
+ return __generator(this, function (_c) {
2509
+ switch (_c.label) {
2510
+ case 0:
2511
+ _a = [__assign({}, output)];
2512
+ _b = {};
2513
+ return [4, parseBody(output.body, context)];
2514
+ case 1:
2515
+ parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
2516
+ return [2, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
2517
+ }
2518
+ });
2519
+ }); };
2520
+ var deserializeAws_json1_1SubscribeToShardEvent_event = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2521
+ var contents, data;
2522
+ return __generator(this, function (_a) {
2523
+ switch (_a.label) {
2524
+ case 0:
2525
+ contents = {};
2526
+ return [4, parseBody(output.body, context)];
2527
+ case 1:
2528
+ data = _a.sent();
2529
+ Object.assign(contents, deserializeAws_json1_1SubscribeToShardEvent(data, context));
2530
+ return [2, contents];
2531
+ }
2532
+ });
2533
+ }); };
2534
+ var deserializeAws_json1_1InternalFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
2535
+ var body, deserialized, exception;
2536
+ return __generator(this, function (_a) {
2537
+ body = parsedOutput.body;
2538
+ deserialized = deserializeAws_json1_1InternalFailureException(body, context);
2539
+ exception = new InternalFailureException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
2540
+ return [2, __decorateServiceException(exception, body)];
2541
+ });
2542
+ }); };
2322
2543
  var serializeAws_json1_1AddTagsToStreamInput = function (input, context) {
2323
2544
  return __assign(__assign({}, (input.StreamName != null && { StreamName: input.StreamName })), (input.Tags != null && { Tags: serializeAws_json1_1TagMap(input.Tags, context) }));
2324
2545
  };
@@ -2869,66 +3090,6 @@ var deserializeAws_json1_1SubscribeToShardEvent = function (output, context) {
2869
3090
  Records: output.Records != null ? deserializeAws_json1_1RecordList(output.Records, context) : undefined,
2870
3091
  };
2871
3092
  };
2872
- var deserializeAws_json1_1SubscribeToShardEventStream = function (output, context) {
2873
- if (output.InternalFailureException !== undefined && output.InternalFailureException !== null) {
2874
- return {
2875
- InternalFailureException: deserializeAws_json1_1InternalFailureException(output.InternalFailureException, context),
2876
- };
2877
- }
2878
- if (output.KMSAccessDeniedException !== undefined && output.KMSAccessDeniedException !== null) {
2879
- return {
2880
- KMSAccessDeniedException: deserializeAws_json1_1KMSAccessDeniedException(output.KMSAccessDeniedException, context),
2881
- };
2882
- }
2883
- if (output.KMSDisabledException !== undefined && output.KMSDisabledException !== null) {
2884
- return {
2885
- KMSDisabledException: deserializeAws_json1_1KMSDisabledException(output.KMSDisabledException, context),
2886
- };
2887
- }
2888
- if (output.KMSInvalidStateException !== undefined && output.KMSInvalidStateException !== null) {
2889
- return {
2890
- KMSInvalidStateException: deserializeAws_json1_1KMSInvalidStateException(output.KMSInvalidStateException, context),
2891
- };
2892
- }
2893
- if (output.KMSNotFoundException !== undefined && output.KMSNotFoundException !== null) {
2894
- return {
2895
- KMSNotFoundException: deserializeAws_json1_1KMSNotFoundException(output.KMSNotFoundException, context),
2896
- };
2897
- }
2898
- if (output.KMSOptInRequired !== undefined && output.KMSOptInRequired !== null) {
2899
- return {
2900
- KMSOptInRequired: deserializeAws_json1_1KMSOptInRequired(output.KMSOptInRequired, context),
2901
- };
2902
- }
2903
- if (output.KMSThrottlingException !== undefined && output.KMSThrottlingException !== null) {
2904
- return {
2905
- KMSThrottlingException: deserializeAws_json1_1KMSThrottlingException(output.KMSThrottlingException, context),
2906
- };
2907
- }
2908
- if (output.ResourceInUseException !== undefined && output.ResourceInUseException !== null) {
2909
- return {
2910
- ResourceInUseException: deserializeAws_json1_1ResourceInUseException(output.ResourceInUseException, context),
2911
- };
2912
- }
2913
- if (output.ResourceNotFoundException !== undefined && output.ResourceNotFoundException !== null) {
2914
- return {
2915
- ResourceNotFoundException: deserializeAws_json1_1ResourceNotFoundException(output.ResourceNotFoundException, context),
2916
- };
2917
- }
2918
- if (output.SubscribeToShardEvent !== undefined && output.SubscribeToShardEvent !== null) {
2919
- return {
2920
- SubscribeToShardEvent: deserializeAws_json1_1SubscribeToShardEvent(output.SubscribeToShardEvent, context),
2921
- };
2922
- }
2923
- return { $unknown: Object.entries(output)[0] };
2924
- };
2925
- var deserializeAws_json1_1SubscribeToShardOutput = function (output, context) {
2926
- return {
2927
- EventStream: output.EventStream != null
2928
- ? deserializeAws_json1_1SubscribeToShardEventStream(__expectUnion(output.EventStream), context)
2929
- : undefined,
2930
- };
2931
- };
2932
3093
  var deserializeAws_json1_1Tag = function (output, context) {
2933
3094
  return {
2934
3095
  Key: __expectString(output.Key),
@@ -3014,6 +3175,9 @@ var loadRestJsonErrorCode = function (output, data) {
3014
3175
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
3015
3176
  var sanitizeErrorCode = function (rawValue) {
3016
3177
  var cleanValue = rawValue;
3178
+ if (typeof cleanValue === "number") {
3179
+ cleanValue = cleanValue.toString();
3180
+ }
3017
3181
  if (cleanValue.indexOf(":") >= 0) {
3018
3182
  cleanValue = cleanValue.split(":")[0];
3019
3183
  }
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
2
- import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
2
+ import { EventStreamSerdeContext as __EventStreamSerdeContext, SerdeContext as __SerdeContext } from "@aws-sdk/types";
3
3
  import { AddTagsToStreamCommandInput, AddTagsToStreamCommandOutput } from "../commands/AddTagsToStreamCommand";
4
4
  import { CreateStreamCommandInput, CreateStreamCommandOutput } from "../commands/CreateStreamCommand";
5
5
  import { DecreaseStreamRetentionPeriodCommandInput, DecreaseStreamRetentionPeriodCommandOutput } from "../commands/DecreaseStreamRetentionPeriodCommand";
@@ -84,6 +84,6 @@ export declare const deserializeAws_json1_1RemoveTagsFromStreamCommand: (output:
84
84
  export declare const deserializeAws_json1_1SplitShardCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SplitShardCommandOutput>;
85
85
  export declare const deserializeAws_json1_1StartStreamEncryptionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<StartStreamEncryptionCommandOutput>;
86
86
  export declare const deserializeAws_json1_1StopStreamEncryptionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<StopStreamEncryptionCommandOutput>;
87
- export declare const deserializeAws_json1_1SubscribeToShardCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SubscribeToShardCommandOutput>;
87
+ export declare const deserializeAws_json1_1SubscribeToShardCommand: (output: __HttpResponse, context: __SerdeContext & __EventStreamSerdeContext) => Promise<SubscribeToShardCommandOutput>;
88
88
  export declare const deserializeAws_json1_1UpdateShardCountCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdateShardCountCommandOutput>;
89
89
  export declare const deserializeAws_json1_1UpdateStreamModeCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdateStreamModeCommandOutput>;
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
2
- import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
2
+ import { EventStreamSerdeContext as __EventStreamSerdeContext, SerdeContext as __SerdeContext } from "@aws-sdk/types";
3
3
  import { AddTagsToStreamCommandInput, AddTagsToStreamCommandOutput } from "../commands/AddTagsToStreamCommand";
4
4
  import { CreateStreamCommandInput, CreateStreamCommandOutput } from "../commands/CreateStreamCommand";
5
5
  import { DecreaseStreamRetentionPeriodCommandInput, DecreaseStreamRetentionPeriodCommandOutput } from "../commands/DecreaseStreamRetentionPeriodCommand";
@@ -84,6 +84,6 @@ export declare const deserializeAws_json1_1RemoveTagsFromStreamCommand: (output:
84
84
  export declare const deserializeAws_json1_1SplitShardCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SplitShardCommandOutput>;
85
85
  export declare const deserializeAws_json1_1StartStreamEncryptionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<StartStreamEncryptionCommandOutput>;
86
86
  export declare const deserializeAws_json1_1StopStreamEncryptionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<StopStreamEncryptionCommandOutput>;
87
- export declare const deserializeAws_json1_1SubscribeToShardCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SubscribeToShardCommandOutput>;
87
+ export declare const deserializeAws_json1_1SubscribeToShardCommand: (output: __HttpResponse, context: __SerdeContext & __EventStreamSerdeContext) => Promise<SubscribeToShardCommandOutput>;
88
88
  export declare const deserializeAws_json1_1UpdateShardCountCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdateShardCountCommandOutput>;
89
89
  export declare const deserializeAws_json1_1UpdateStreamModeCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdateStreamModeCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-kinesis",
3
3
  "description": "AWS SDK for JavaScript Kinesis Client for Node.js, Browser and React Native",
4
- "version": "3.128.0",
4
+ "version": "3.136.1",
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,13 +18,13 @@
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.128.0",
22
- "@aws-sdk/config-resolver": "3.128.0",
23
- "@aws-sdk/credential-provider-node": "3.128.0",
21
+ "@aws-sdk/client-sts": "3.131.0",
22
+ "@aws-sdk/config-resolver": "3.130.0",
23
+ "@aws-sdk/credential-provider-node": "3.131.0",
24
24
  "@aws-sdk/eventstream-serde-browser": "3.127.0",
25
25
  "@aws-sdk/eventstream-serde-config-resolver": "3.127.0",
26
26
  "@aws-sdk/eventstream-serde-node": "3.127.0",
27
- "@aws-sdk/fetch-http-handler": "3.127.0",
27
+ "@aws-sdk/fetch-http-handler": "3.131.0",
28
28
  "@aws-sdk/hash-node": "3.127.0",
29
29
  "@aws-sdk/invalid-dependency": "3.127.0",
30
30
  "@aws-sdk/middleware-content-length": "3.127.0",
@@ -33,7 +33,7 @@
33
33
  "@aws-sdk/middleware-recursion-detection": "3.127.0",
34
34
  "@aws-sdk/middleware-retry": "3.127.0",
35
35
  "@aws-sdk/middleware-serde": "3.127.0",
36
- "@aws-sdk/middleware-signing": "3.128.0",
36
+ "@aws-sdk/middleware-signing": "3.130.0",
37
37
  "@aws-sdk/middleware-stack": "3.127.0",
38
38
  "@aws-sdk/middleware-user-agent": "3.127.0",
39
39
  "@aws-sdk/node-config-provider": "3.127.0",
@@ -47,7 +47,7 @@
47
47
  "@aws-sdk/util-body-length-browser": "3.55.0",
48
48
  "@aws-sdk/util-body-length-node": "3.55.0",
49
49
  "@aws-sdk/util-defaults-mode-browser": "3.127.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.128.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.130.0",
51
51
  "@aws-sdk/util-user-agent-browser": "3.127.0",
52
52
  "@aws-sdk/util-user-agent-node": "3.127.0",
53
53
  "@aws-sdk/util-utf8-browser": "3.109.0",