@aws-sdk/client-iot-data-plane 3.523.0 → 3.529.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/dist-cjs/index.js +6 -46
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +17 -17
- package/dist-cjs/IoTDataPlane.js +0 -1
- package/dist-cjs/IoTDataPlaneClient.js +0 -1
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -1
- package/dist-cjs/commands/DeleteThingShadowCommand.js +0 -1
- package/dist-cjs/commands/GetRetainedMessageCommand.js +0 -1
- package/dist-cjs/commands/GetThingShadowCommand.js +0 -1
- package/dist-cjs/commands/ListNamedShadowsForThingCommand.js +0 -1
- package/dist-cjs/commands/ListRetainedMessagesCommand.js +0 -1
- package/dist-cjs/commands/PublishCommand.js +0 -1
- package/dist-cjs/commands/UpdateThingShadowCommand.js +0 -1
- package/dist-cjs/commands/index.js +0 -1
- package/dist-cjs/endpoint/EndpointParameters.js +0 -1
- package/dist-cjs/extensionConfiguration.js +0 -1
- package/dist-cjs/models/IoTDataPlaneServiceException.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListRetainedMessagesPaginator.js +0 -1
- package/dist-cjs/pagination/index.js +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1
- package/dist-cjs/runtimeExtensions.js +0 -1
package/dist-cjs/index.js
CHANGED
|
@@ -200,6 +200,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
200
200
|
var import_types = require("@smithy/types");
|
|
201
201
|
|
|
202
202
|
// src/protocols/Aws_restJson1.ts
|
|
203
|
+
var import_core2 = require("@aws-sdk/core");
|
|
203
204
|
|
|
204
205
|
|
|
205
206
|
|
|
@@ -514,7 +515,7 @@ var de_GetRetainedMessageCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
514
515
|
const contents = (0, import_smithy_client.map)({
|
|
515
516
|
$metadata: deserializeMetadata(output)
|
|
516
517
|
});
|
|
517
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
518
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
518
519
|
const doc = (0, import_smithy_client.take)(data, {
|
|
519
520
|
lastModifiedTime: import_smithy_client.expectLong,
|
|
520
521
|
payload: context.base64Decoder,
|
|
@@ -543,7 +544,7 @@ var de_ListNamedShadowsForThingCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
543
544
|
const contents = (0, import_smithy_client.map)({
|
|
544
545
|
$metadata: deserializeMetadata(output)
|
|
545
546
|
});
|
|
546
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
547
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
547
548
|
const doc = (0, import_smithy_client.take)(data, {
|
|
548
549
|
nextToken: import_smithy_client.expectString,
|
|
549
550
|
results: import_smithy_client._json,
|
|
@@ -559,7 +560,7 @@ var de_ListRetainedMessagesCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
559
560
|
const contents = (0, import_smithy_client.map)({
|
|
560
561
|
$metadata: deserializeMetadata(output)
|
|
561
562
|
});
|
|
562
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
563
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
563
564
|
const doc = (0, import_smithy_client.take)(data, {
|
|
564
565
|
nextToken: import_smithy_client.expectString,
|
|
565
566
|
retainedTopics: import_smithy_client._json
|
|
@@ -591,9 +592,9 @@ var de_UpdateThingShadowCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
591
592
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
592
593
|
const parsedOutput = {
|
|
593
594
|
...output,
|
|
594
|
-
body: await
|
|
595
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
595
596
|
};
|
|
596
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
597
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
597
598
|
switch (errorCode) {
|
|
598
599
|
case "InternalFailureException":
|
|
599
600
|
case "com.amazonaws.iotdataplane#InternalFailureException":
|
|
@@ -771,7 +772,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
771
772
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
772
773
|
cfId: output.headers["x-amz-cf-id"]
|
|
773
774
|
}), "deserializeMetadata");
|
|
774
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
775
775
|
var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue");
|
|
776
776
|
var _cD = "correlationData";
|
|
777
777
|
var _cT = "contentType";
|
|
@@ -789,46 +789,6 @@ var _uP = "userProperties";
|
|
|
789
789
|
var _xamcd = "x-amz-mqtt5-correlation-data";
|
|
790
790
|
var _xampfi = "x-amz-mqtt5-payload-format-indicator";
|
|
791
791
|
var _xamup = "x-amz-mqtt5-user-properties";
|
|
792
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
793
|
-
if (encoded.length) {
|
|
794
|
-
return JSON.parse(encoded);
|
|
795
|
-
}
|
|
796
|
-
return {};
|
|
797
|
-
}), "parseBody");
|
|
798
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
799
|
-
const value = await parseBody(errorBody, context);
|
|
800
|
-
value.message = value.message ?? value.Message;
|
|
801
|
-
return value;
|
|
802
|
-
}, "parseErrorBody");
|
|
803
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
804
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
805
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
806
|
-
let cleanValue = rawValue;
|
|
807
|
-
if (typeof cleanValue === "number") {
|
|
808
|
-
cleanValue = cleanValue.toString();
|
|
809
|
-
}
|
|
810
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
811
|
-
cleanValue = cleanValue.split(",")[0];
|
|
812
|
-
}
|
|
813
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
814
|
-
cleanValue = cleanValue.split(":")[0];
|
|
815
|
-
}
|
|
816
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
817
|
-
cleanValue = cleanValue.split("#")[1];
|
|
818
|
-
}
|
|
819
|
-
return cleanValue;
|
|
820
|
-
}, "sanitizeErrorCode");
|
|
821
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
822
|
-
if (headerKey !== void 0) {
|
|
823
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
824
|
-
}
|
|
825
|
-
if (data.code !== void 0) {
|
|
826
|
-
return sanitizeErrorCode(data.code);
|
|
827
|
-
}
|
|
828
|
-
if (data["__type"] !== void 0) {
|
|
829
|
-
return sanitizeErrorCode(data["__type"]);
|
|
830
|
-
}
|
|
831
|
-
}, "loadRestJsonErrorCode");
|
|
832
792
|
|
|
833
793
|
// src/commands/DeleteThingShadowCommand.ts
|
|
834
794
|
var _DeleteThingShadowCommand = class _DeleteThingShadowCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { requestBuilder as rb } from "@smithy/core";
|
|
2
3
|
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, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { IoTDataPlaneServiceException as __BaseException } from "../models/IoTDataPlaneServiceException";
|
|
@@ -401,43 +402,3 @@ const _uP = "userProperties";
|
|
|
401
402
|
const _xamcd = "x-amz-mqtt5-correlation-data";
|
|
402
403
|
const _xampfi = "x-amz-mqtt5-payload-format-indicator";
|
|
403
404
|
const _xamup = "x-amz-mqtt5-user-properties";
|
|
404
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
405
|
-
if (encoded.length) {
|
|
406
|
-
return JSON.parse(encoded);
|
|
407
|
-
}
|
|
408
|
-
return {};
|
|
409
|
-
});
|
|
410
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
411
|
-
const value = await parseBody(errorBody, context);
|
|
412
|
-
value.message = value.message ?? value.Message;
|
|
413
|
-
return value;
|
|
414
|
-
};
|
|
415
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
416
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
417
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
418
|
-
let cleanValue = rawValue;
|
|
419
|
-
if (typeof cleanValue === "number") {
|
|
420
|
-
cleanValue = cleanValue.toString();
|
|
421
|
-
}
|
|
422
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
423
|
-
cleanValue = cleanValue.split(",")[0];
|
|
424
|
-
}
|
|
425
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
426
|
-
cleanValue = cleanValue.split(":")[0];
|
|
427
|
-
}
|
|
428
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
429
|
-
cleanValue = cleanValue.split("#")[1];
|
|
430
|
-
}
|
|
431
|
-
return cleanValue;
|
|
432
|
-
};
|
|
433
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
434
|
-
if (headerKey !== undefined) {
|
|
435
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
436
|
-
}
|
|
437
|
-
if (data.code !== undefined) {
|
|
438
|
-
return sanitizeErrorCode(data.code);
|
|
439
|
-
}
|
|
440
|
-
if (data["__type"] !== undefined) {
|
|
441
|
-
return sanitizeErrorCode(data["__type"]);
|
|
442
|
-
}
|
|
443
|
-
};
|
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.
|
|
4
|
+
"version": "3.529.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-iot-data-plane",
|
|
@@ -20,40 +20,40 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.0",
|
|
24
|
+
"@aws-sdk/core": "3.529.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|
|
29
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
30
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
29
|
+
"@aws-sdk/middleware-user-agent": "3.525.0",
|
|
30
|
+
"@aws-sdk/region-config-resolver": "3.525.0",
|
|
31
31
|
"@aws-sdk/types": "3.523.0",
|
|
32
|
-
"@aws-sdk/util-endpoints": "3.
|
|
32
|
+
"@aws-sdk/util-endpoints": "3.525.0",
|
|
33
33
|
"@aws-sdk/util-user-agent-browser": "3.523.0",
|
|
34
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
35
|
-
"@smithy/config-resolver": "^2.1.
|
|
36
|
-
"@smithy/core": "^1.3.
|
|
34
|
+
"@aws-sdk/util-user-agent-node": "3.525.0",
|
|
35
|
+
"@smithy/config-resolver": "^2.1.4",
|
|
36
|
+
"@smithy/core": "^1.3.5",
|
|
37
37
|
"@smithy/fetch-http-handler": "^2.4.3",
|
|
38
38
|
"@smithy/hash-node": "^2.1.3",
|
|
39
39
|
"@smithy/invalid-dependency": "^2.1.3",
|
|
40
40
|
"@smithy/middleware-content-length": "^2.1.3",
|
|
41
|
-
"@smithy/middleware-endpoint": "^2.4.
|
|
42
|
-
"@smithy/middleware-retry": "^2.1.
|
|
41
|
+
"@smithy/middleware-endpoint": "^2.4.4",
|
|
42
|
+
"@smithy/middleware-retry": "^2.1.4",
|
|
43
43
|
"@smithy/middleware-serde": "^2.1.3",
|
|
44
44
|
"@smithy/middleware-stack": "^2.1.3",
|
|
45
|
-
"@smithy/node-config-provider": "^2.2.
|
|
45
|
+
"@smithy/node-config-provider": "^2.2.4",
|
|
46
46
|
"@smithy/node-http-handler": "^2.4.1",
|
|
47
47
|
"@smithy/protocol-http": "^3.2.1",
|
|
48
|
-
"@smithy/smithy-client": "^2.4.
|
|
48
|
+
"@smithy/smithy-client": "^2.4.2",
|
|
49
49
|
"@smithy/types": "^2.10.1",
|
|
50
50
|
"@smithy/url-parser": "^2.1.3",
|
|
51
51
|
"@smithy/util-base64": "^2.1.1",
|
|
52
52
|
"@smithy/util-body-length-browser": "^2.1.1",
|
|
53
53
|
"@smithy/util-body-length-node": "^2.2.1",
|
|
54
|
-
"@smithy/util-defaults-mode-browser": "^2.1.
|
|
55
|
-
"@smithy/util-defaults-mode-node": "^2.2.
|
|
56
|
-
"@smithy/util-endpoints": "^1.1.
|
|
54
|
+
"@smithy/util-defaults-mode-browser": "^2.1.4",
|
|
55
|
+
"@smithy/util-defaults-mode-node": "^2.2.3",
|
|
56
|
+
"@smithy/util-endpoints": "^1.1.4",
|
|
57
57
|
"@smithy/util-middleware": "^2.1.3",
|
|
58
58
|
"@smithy/util-retry": "^2.1.3",
|
|
59
59
|
"@smithy/util-stream": "^2.1.3",
|
package/dist-cjs/IoTDataPlane.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
package/dist-cjs/models/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../index.js");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./index.js");
|