@aws-sdk/client-iot-data-plane 3.354.0 → 3.357.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.
@@ -177,7 +177,7 @@ const de_DeleteThingShadowCommand = async (output, context) => {
177
177
  const contents = (0, smithy_client_1.map)({
178
178
  $metadata: deserializeMetadata(output),
179
179
  });
180
- const data = await collectBody(output.body, context);
180
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
181
181
  contents.payload = data;
182
182
  return contents;
183
183
  };
@@ -285,7 +285,7 @@ const de_GetThingShadowCommand = async (output, context) => {
285
285
  const contents = (0, smithy_client_1.map)({
286
286
  $metadata: deserializeMetadata(output),
287
287
  });
288
- const data = await collectBody(output.body, context);
288
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
289
289
  contents.payload = data;
290
290
  return contents;
291
291
  };
@@ -441,7 +441,7 @@ const de_PublishCommand = async (output, context) => {
441
441
  const contents = (0, smithy_client_1.map)({
442
442
  $metadata: deserializeMetadata(output),
443
443
  });
444
- await collectBody(output.body, context);
444
+ await (0, smithy_client_1.collectBody)(output.body, context);
445
445
  return contents;
446
446
  };
447
447
  exports.de_PublishCommand = de_PublishCommand;
@@ -483,7 +483,7 @@ const de_UpdateThingShadowCommand = async (output, context) => {
483
483
  const contents = (0, smithy_client_1.map)({
484
484
  $metadata: deserializeMetadata(output),
485
485
  });
486
- const data = await collectBody(output.body, context);
486
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
487
487
  contents.payload = data;
488
488
  return contents;
489
489
  };
@@ -668,13 +668,7 @@ const deserializeMetadata = (output) => ({
668
668
  extendedRequestId: output.headers["x-amz-id-2"],
669
669
  cfId: output.headers["x-amz-cf-id"],
670
670
  });
671
- const collectBody = (streamBody = new Uint8Array(), context) => {
672
- if (streamBody instanceof Uint8Array) {
673
- return Promise.resolve(streamBody);
674
- }
675
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
676
- };
677
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
671
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
678
672
  const isSerializableHeaderValue = (value) => value !== undefined &&
679
673
  value !== null &&
680
674
  value !== "" &&
@@ -1,4 +1,4 @@
1
- import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
1
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { IoTDataPlaneServiceException as __BaseException } from "../models/IoTDataPlaneServiceException";
4
4
  import { ConflictException, InternalFailureException, InvalidRequestException, MethodNotAllowedException, RequestEntityTooLargeException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, UnauthorizedException, UnsupportedDocumentEncodingException, } from "../models/models_0";
@@ -651,12 +651,6 @@ const deserializeMetadata = (output) => ({
651
651
  extendedRequestId: output.headers["x-amz-id-2"],
652
652
  cfId: output.headers["x-amz-cf-id"],
653
653
  });
654
- const collectBody = (streamBody = new Uint8Array(), context) => {
655
- if (streamBody instanceof Uint8Array) {
656
- return Promise.resolve(streamBody);
657
- }
658
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
659
- };
660
654
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
661
655
  const isSerializableHeaderValue = (value) => value !== undefined &&
662
656
  value !== null &&
@@ -80,7 +80,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
80
80
  */
81
81
  runtime?: string;
82
82
  /**
83
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
83
+ * Disable dynamically changing the endpoint of the client based on the hostPrefix
84
84
  * trait of an operation.
85
85
  */
86
86
  disableHostPrefix?: boolean;
@@ -1,6 +1,7 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
4
5
  import { IoTDataPlaneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTDataPlaneClient";
5
6
  import { DeleteThingShadowRequest, DeleteThingShadowResponse } from "../models/models_0";
6
7
  /**
@@ -14,12 +15,18 @@ export { __MetadataBearer, $Command };
14
15
  */
15
16
  export interface DeleteThingShadowCommandInput extends DeleteThingShadowRequest {
16
17
  }
18
+ /**
19
+ * @public
20
+ */
21
+ export type DeleteThingShadowCommandOutputType = Omit<DeleteThingShadowResponse, "payload"> & {
22
+ payload: Uint8ArrayBlobAdapter;
23
+ };
17
24
  /**
18
25
  * @public
19
26
  *
20
27
  * The output of {@link DeleteThingShadowCommand}.
21
28
  */
22
- export interface DeleteThingShadowCommandOutput extends DeleteThingShadowResponse, __MetadataBearer {
29
+ export interface DeleteThingShadowCommandOutput extends DeleteThingShadowCommandOutputType, __MetadataBearer {
23
30
  }
24
31
  /**
25
32
  * @public
@@ -1,6 +1,7 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
4
5
  import { IoTDataPlaneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTDataPlaneClient";
5
6
  import { GetThingShadowRequest, GetThingShadowResponse } from "../models/models_0";
6
7
  /**
@@ -14,12 +15,18 @@ export { __MetadataBearer, $Command };
14
15
  */
15
16
  export interface GetThingShadowCommandInput extends GetThingShadowRequest {
16
17
  }
18
+ /**
19
+ * @public
20
+ */
21
+ export type GetThingShadowCommandOutputType = Omit<GetThingShadowResponse, "payload"> & {
22
+ payload?: Uint8ArrayBlobAdapter;
23
+ };
17
24
  /**
18
25
  * @public
19
26
  *
20
27
  * The output of {@link GetThingShadowCommand}.
21
28
  */
22
- export interface GetThingShadowCommandOutput extends GetThingShadowResponse, __MetadataBearer {
29
+ export interface GetThingShadowCommandOutput extends GetThingShadowCommandOutputType, __MetadataBearer {
23
30
  }
24
31
  /**
25
32
  * @public
@@ -1,18 +1,24 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { BlobTypes, Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { IoTDataPlaneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTDataPlaneClient";
5
5
  import { PublishRequest } from "../models/models_0";
6
6
  /**
7
7
  * @public
8
8
  */
9
9
  export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ */
13
+ export type PublishCommandInputType = Omit<PublishRequest, "payload"> & {
14
+ payload?: BlobTypes;
15
+ };
10
16
  /**
11
17
  * @public
12
18
  *
13
19
  * The input for {@link PublishCommand}.
14
20
  */
15
- export interface PublishCommandInput extends PublishRequest {
21
+ export interface PublishCommandInput extends PublishCommandInputType {
16
22
  }
17
23
  /**
18
24
  * @public
@@ -1,25 +1,38 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { BlobTypes, Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
4
5
  import { IoTDataPlaneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTDataPlaneClient";
5
6
  import { UpdateThingShadowRequest, UpdateThingShadowResponse } from "../models/models_0";
6
7
  /**
7
8
  * @public
8
9
  */
9
10
  export { __MetadataBearer, $Command };
11
+ /**
12
+ * @public
13
+ */
14
+ export type UpdateThingShadowCommandInputType = Omit<UpdateThingShadowRequest, "payload"> & {
15
+ payload: BlobTypes;
16
+ };
10
17
  /**
11
18
  * @public
12
19
  *
13
20
  * The input for {@link UpdateThingShadowCommand}.
14
21
  */
15
- export interface UpdateThingShadowCommandInput extends UpdateThingShadowRequest {
22
+ export interface UpdateThingShadowCommandInput extends UpdateThingShadowCommandInputType {
16
23
  }
24
+ /**
25
+ * @public
26
+ */
27
+ export type UpdateThingShadowCommandOutputType = Omit<UpdateThingShadowResponse, "payload"> & {
28
+ payload?: Uint8ArrayBlobAdapter;
29
+ };
17
30
  /**
18
31
  * @public
19
32
  *
20
33
  * The output of {@link UpdateThingShadowCommand}.
21
34
  */
22
- export interface UpdateThingShadowCommandOutput extends UpdateThingShadowResponse, __MetadataBearer {
35
+ export interface UpdateThingShadowCommandOutput extends UpdateThingShadowCommandOutputType, __MetadataBearer {
23
36
  }
24
37
  /**
25
38
  * @public
@@ -6,6 +6,7 @@ import {
6
6
  MetadataBearer as __MetadataBearer,
7
7
  MiddlewareStack,
8
8
  } from "@aws-sdk/types";
9
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
9
10
  import {
10
11
  IoTDataPlaneClientResolvedConfig,
11
12
  ServiceInputTypes,
@@ -18,8 +19,14 @@ import {
18
19
  export { __MetadataBearer, $Command };
19
20
  export interface DeleteThingShadowCommandInput
20
21
  extends DeleteThingShadowRequest {}
22
+ export type DeleteThingShadowCommandOutputType = Pick<
23
+ DeleteThingShadowResponse,
24
+ Exclude<keyof DeleteThingShadowResponse, "payload">
25
+ > & {
26
+ payload: Uint8ArrayBlobAdapter;
27
+ };
21
28
  export interface DeleteThingShadowCommandOutput
22
- extends DeleteThingShadowResponse,
29
+ extends DeleteThingShadowCommandOutputType,
23
30
  __MetadataBearer {}
24
31
  export declare class DeleteThingShadowCommand extends $Command<
25
32
  DeleteThingShadowCommandInput,
@@ -6,6 +6,7 @@ import {
6
6
  MetadataBearer as __MetadataBearer,
7
7
  MiddlewareStack,
8
8
  } from "@aws-sdk/types";
9
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
9
10
  import {
10
11
  IoTDataPlaneClientResolvedConfig,
11
12
  ServiceInputTypes,
@@ -17,8 +18,14 @@ import {
17
18
  } from "../models/models_0";
18
19
  export { __MetadataBearer, $Command };
19
20
  export interface GetThingShadowCommandInput extends GetThingShadowRequest {}
21
+ export type GetThingShadowCommandOutputType = Pick<
22
+ GetThingShadowResponse,
23
+ Exclude<keyof GetThingShadowResponse, "payload">
24
+ > & {
25
+ payload?: Uint8ArrayBlobAdapter;
26
+ };
20
27
  export interface GetThingShadowCommandOutput
21
- extends GetThingShadowResponse,
28
+ extends GetThingShadowCommandOutputType,
22
29
  __MetadataBearer {}
23
30
  export declare class GetThingShadowCommand extends $Command<
24
31
  GetThingShadowCommandInput,
@@ -1,6 +1,7 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import {
4
+ BlobTypes,
4
5
  Handler,
5
6
  HttpHandlerOptions as __HttpHandlerOptions,
6
7
  MetadataBearer as __MetadataBearer,
@@ -13,7 +14,13 @@ import {
13
14
  } from "../IoTDataPlaneClient";
14
15
  import { PublishRequest } from "../models/models_0";
15
16
  export { __MetadataBearer, $Command };
16
- export interface PublishCommandInput extends PublishRequest {}
17
+ export type PublishCommandInputType = Pick<
18
+ PublishRequest,
19
+ Exclude<keyof PublishRequest, "payload">
20
+ > & {
21
+ payload?: BlobTypes;
22
+ };
23
+ export interface PublishCommandInput extends PublishCommandInputType {}
17
24
  export interface PublishCommandOutput extends __MetadataBearer {}
18
25
  export declare class PublishCommand extends $Command<
19
26
  PublishCommandInput,
@@ -1,11 +1,13 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import {
4
+ BlobTypes,
4
5
  Handler,
5
6
  HttpHandlerOptions as __HttpHandlerOptions,
6
7
  MetadataBearer as __MetadataBearer,
7
8
  MiddlewareStack,
8
9
  } from "@aws-sdk/types";
10
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
9
11
  import {
10
12
  IoTDataPlaneClientResolvedConfig,
11
13
  ServiceInputTypes,
@@ -16,10 +18,22 @@ import {
16
18
  UpdateThingShadowResponse,
17
19
  } from "../models/models_0";
18
20
  export { __MetadataBearer, $Command };
21
+ export type UpdateThingShadowCommandInputType = Pick<
22
+ UpdateThingShadowRequest,
23
+ Exclude<keyof UpdateThingShadowRequest, "payload">
24
+ > & {
25
+ payload: BlobTypes;
26
+ };
19
27
  export interface UpdateThingShadowCommandInput
20
- extends UpdateThingShadowRequest {}
28
+ extends UpdateThingShadowCommandInputType {}
29
+ export type UpdateThingShadowCommandOutputType = Pick<
30
+ UpdateThingShadowResponse,
31
+ Exclude<keyof UpdateThingShadowResponse, "payload">
32
+ > & {
33
+ payload?: Uint8ArrayBlobAdapter;
34
+ };
21
35
  export interface UpdateThingShadowCommandOutput
22
- extends UpdateThingShadowResponse,
36
+ extends UpdateThingShadowCommandOutputType,
23
37
  __MetadataBearer {}
24
38
  export declare class UpdateThingShadowCommand extends $Command<
25
39
  UpdateThingShadowCommandInput,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-iot-data-plane",
3
3
  "description": "AWS SDK for JavaScript Iot Data Plane Client for Node.js, Browser and React Native",
4
- "version": "3.354.0",
4
+ "version": "3.357.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",
@@ -21,36 +21,37 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.354.0",
25
- "@aws-sdk/config-resolver": "3.354.0",
26
- "@aws-sdk/credential-provider-node": "3.354.0",
27
- "@aws-sdk/fetch-http-handler": "3.353.0",
28
- "@aws-sdk/hash-node": "3.347.0",
29
- "@aws-sdk/invalid-dependency": "3.347.0",
30
- "@aws-sdk/middleware-content-length": "3.347.0",
31
- "@aws-sdk/middleware-endpoint": "3.347.0",
32
- "@aws-sdk/middleware-host-header": "3.347.0",
33
- "@aws-sdk/middleware-logger": "3.347.0",
34
- "@aws-sdk/middleware-recursion-detection": "3.347.0",
35
- "@aws-sdk/middleware-retry": "3.354.0",
36
- "@aws-sdk/middleware-serde": "3.347.0",
37
- "@aws-sdk/middleware-signing": "3.354.0",
38
- "@aws-sdk/middleware-stack": "3.347.0",
39
- "@aws-sdk/middleware-user-agent": "3.352.0",
40
- "@aws-sdk/node-config-provider": "3.354.0",
41
- "@aws-sdk/node-http-handler": "3.350.0",
42
- "@aws-sdk/smithy-client": "3.347.0",
43
- "@aws-sdk/types": "3.347.0",
44
- "@aws-sdk/url-parser": "3.347.0",
24
+ "@aws-sdk/client-sts": "3.357.0",
25
+ "@aws-sdk/config-resolver": "3.357.0",
26
+ "@aws-sdk/credential-provider-node": "3.357.0",
27
+ "@aws-sdk/fetch-http-handler": "3.357.0",
28
+ "@aws-sdk/hash-node": "3.357.0",
29
+ "@aws-sdk/invalid-dependency": "3.357.0",
30
+ "@aws-sdk/middleware-content-length": "3.357.0",
31
+ "@aws-sdk/middleware-endpoint": "3.357.0",
32
+ "@aws-sdk/middleware-host-header": "3.357.0",
33
+ "@aws-sdk/middleware-logger": "3.357.0",
34
+ "@aws-sdk/middleware-recursion-detection": "3.357.0",
35
+ "@aws-sdk/middleware-retry": "3.357.0",
36
+ "@aws-sdk/middleware-serde": "3.357.0",
37
+ "@aws-sdk/middleware-signing": "3.357.0",
38
+ "@aws-sdk/middleware-stack": "3.357.0",
39
+ "@aws-sdk/middleware-user-agent": "3.357.0",
40
+ "@aws-sdk/node-config-provider": "3.357.0",
41
+ "@aws-sdk/node-http-handler": "3.357.0",
42
+ "@aws-sdk/smithy-client": "3.357.0",
43
+ "@aws-sdk/types": "3.357.0",
44
+ "@aws-sdk/url-parser": "3.357.0",
45
45
  "@aws-sdk/util-base64": "3.310.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.310.0",
47
47
  "@aws-sdk/util-body-length-node": "3.310.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.353.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.354.0",
50
- "@aws-sdk/util-endpoints": "3.352.0",
51
- "@aws-sdk/util-retry": "3.347.0",
52
- "@aws-sdk/util-user-agent-browser": "3.347.0",
53
- "@aws-sdk/util-user-agent-node": "3.354.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.357.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.357.0",
50
+ "@aws-sdk/util-endpoints": "3.357.0",
51
+ "@aws-sdk/util-retry": "3.357.0",
52
+ "@aws-sdk/util-stream": "3.357.0",
53
+ "@aws-sdk/util-user-agent-browser": "3.357.0",
54
+ "@aws-sdk/util-user-agent-node": "3.357.0",
54
55
  "@aws-sdk/util-utf8": "3.310.0",
55
56
  "@smithy/protocol-http": "^1.0.1",
56
57
  "@smithy/types": "^1.0.0",