@aws-sdk/client-iot-jobs-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 +7 -47
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +17 -17
- package/dist-cjs/IoTJobsDataPlane.js +0 -1
- package/dist-cjs/IoTJobsDataPlaneClient.js +0 -1
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -1
- package/dist-cjs/commands/DescribeJobExecutionCommand.js +0 -1
- package/dist-cjs/commands/GetPendingJobExecutionsCommand.js +0 -1
- package/dist-cjs/commands/StartNextPendingJobExecutionCommand.js +0 -1
- package/dist-cjs/commands/UpdateJobExecutionCommand.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/IoTJobsDataPlaneServiceException.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.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
|
@@ -193,6 +193,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
193
193
|
var import_types = require("@smithy/types");
|
|
194
194
|
|
|
195
195
|
// src/protocols/Aws_restJson1.ts
|
|
196
|
+
var import_core2 = require("@aws-sdk/core");
|
|
196
197
|
|
|
197
198
|
|
|
198
199
|
|
|
@@ -413,7 +414,7 @@ var de_DescribeJobExecutionCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
413
414
|
const contents = (0, import_smithy_client.map)({
|
|
414
415
|
$metadata: deserializeMetadata(output)
|
|
415
416
|
});
|
|
416
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
417
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
417
418
|
const doc = (0, import_smithy_client.take)(data, {
|
|
418
419
|
execution: import_smithy_client._json
|
|
419
420
|
});
|
|
@@ -427,7 +428,7 @@ var de_GetPendingJobExecutionsCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
427
428
|
const contents = (0, import_smithy_client.map)({
|
|
428
429
|
$metadata: deserializeMetadata(output)
|
|
429
430
|
});
|
|
430
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
431
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
431
432
|
const doc = (0, import_smithy_client.take)(data, {
|
|
432
433
|
inProgressJobs: import_smithy_client._json,
|
|
433
434
|
queuedJobs: import_smithy_client._json
|
|
@@ -442,7 +443,7 @@ var de_StartNextPendingJobExecutionCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
442
443
|
const contents = (0, import_smithy_client.map)({
|
|
443
444
|
$metadata: deserializeMetadata(output)
|
|
444
445
|
});
|
|
445
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
446
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
446
447
|
const doc = (0, import_smithy_client.take)(data, {
|
|
447
448
|
execution: import_smithy_client._json
|
|
448
449
|
});
|
|
@@ -456,7 +457,7 @@ var de_UpdateJobExecutionCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
456
457
|
const contents = (0, import_smithy_client.map)({
|
|
457
458
|
$metadata: deserializeMetadata(output)
|
|
458
459
|
});
|
|
459
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
460
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
460
461
|
const doc = (0, import_smithy_client.take)(data, {
|
|
461
462
|
executionState: import_smithy_client._json,
|
|
462
463
|
jobDocument: import_smithy_client.expectString
|
|
@@ -467,9 +468,9 @@ var de_UpdateJobExecutionCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
467
468
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
468
469
|
const parsedOutput = {
|
|
469
470
|
...output,
|
|
470
|
-
body: await
|
|
471
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
471
472
|
};
|
|
472
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
473
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
473
474
|
switch (errorCode) {
|
|
474
475
|
case "CertificateValidationException":
|
|
475
476
|
case "com.amazonaws.iotjobsdataplane#CertificateValidationException":
|
|
@@ -600,49 +601,8 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
600
601
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
601
602
|
cfId: output.headers["x-amz-cf-id"]
|
|
602
603
|
}), "deserializeMetadata");
|
|
603
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
604
604
|
var _eN = "executionNumber";
|
|
605
605
|
var _iJD = "includeJobDocument";
|
|
606
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
607
|
-
if (encoded.length) {
|
|
608
|
-
return JSON.parse(encoded);
|
|
609
|
-
}
|
|
610
|
-
return {};
|
|
611
|
-
}), "parseBody");
|
|
612
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
613
|
-
const value = await parseBody(errorBody, context);
|
|
614
|
-
value.message = value.message ?? value.Message;
|
|
615
|
-
return value;
|
|
616
|
-
}, "parseErrorBody");
|
|
617
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
618
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
619
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
620
|
-
let cleanValue = rawValue;
|
|
621
|
-
if (typeof cleanValue === "number") {
|
|
622
|
-
cleanValue = cleanValue.toString();
|
|
623
|
-
}
|
|
624
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
625
|
-
cleanValue = cleanValue.split(",")[0];
|
|
626
|
-
}
|
|
627
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
628
|
-
cleanValue = cleanValue.split(":")[0];
|
|
629
|
-
}
|
|
630
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
631
|
-
cleanValue = cleanValue.split("#")[1];
|
|
632
|
-
}
|
|
633
|
-
return cleanValue;
|
|
634
|
-
}, "sanitizeErrorCode");
|
|
635
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
636
|
-
if (headerKey !== void 0) {
|
|
637
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
638
|
-
}
|
|
639
|
-
if (data.code !== void 0) {
|
|
640
|
-
return sanitizeErrorCode(data.code);
|
|
641
|
-
}
|
|
642
|
-
if (data["__type"] !== void 0) {
|
|
643
|
-
return sanitizeErrorCode(data["__type"]);
|
|
644
|
-
}
|
|
645
|
-
}, "loadRestJsonErrorCode");
|
|
646
606
|
|
|
647
607
|
// src/commands/DescribeJobExecutionCommand.ts
|
|
648
608
|
var _DescribeJobExecutionCommand = class _DescribeJobExecutionCommand 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, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { IoTJobsDataPlaneServiceException as __BaseException } from "../models/IoTJobsDataPlaneServiceException";
|
|
@@ -263,43 +264,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
263
264
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
264
265
|
const _eN = "executionNumber";
|
|
265
266
|
const _iJD = "includeJobDocument";
|
|
266
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
267
|
-
if (encoded.length) {
|
|
268
|
-
return JSON.parse(encoded);
|
|
269
|
-
}
|
|
270
|
-
return {};
|
|
271
|
-
});
|
|
272
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
273
|
-
const value = await parseBody(errorBody, context);
|
|
274
|
-
value.message = value.message ?? value.Message;
|
|
275
|
-
return value;
|
|
276
|
-
};
|
|
277
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
278
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
279
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
280
|
-
let cleanValue = rawValue;
|
|
281
|
-
if (typeof cleanValue === "number") {
|
|
282
|
-
cleanValue = cleanValue.toString();
|
|
283
|
-
}
|
|
284
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
285
|
-
cleanValue = cleanValue.split(",")[0];
|
|
286
|
-
}
|
|
287
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
288
|
-
cleanValue = cleanValue.split(":")[0];
|
|
289
|
-
}
|
|
290
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
291
|
-
cleanValue = cleanValue.split("#")[1];
|
|
292
|
-
}
|
|
293
|
-
return cleanValue;
|
|
294
|
-
};
|
|
295
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
296
|
-
if (headerKey !== undefined) {
|
|
297
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
298
|
-
}
|
|
299
|
-
if (data.code !== undefined) {
|
|
300
|
-
return sanitizeErrorCode(data.code);
|
|
301
|
-
}
|
|
302
|
-
if (data["__type"] !== undefined) {
|
|
303
|
-
return sanitizeErrorCode(data["__type"]);
|
|
304
|
-
}
|
|
305
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-iot-jobs-data-plane",
|
|
3
3
|
"description": "AWS SDK for JavaScript Iot Jobs 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-jobs-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-utf8": "^2.1.1",
|
|
@@ -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");
|