@aws-sdk/client-iot-jobs-data-plane 3.476.0 → 3.478.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.
|
@@ -1,81 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.de_UpdateJobExecutionCommand = exports.de_StartNextPendingJobExecutionCommand = exports.de_GetPendingJobExecutionsCommand = exports.de_DescribeJobExecutionCommand = exports.se_UpdateJobExecutionCommand = exports.se_StartNextPendingJobExecutionCommand = exports.se_GetPendingJobExecutionsCommand = exports.se_DescribeJobExecutionCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const IoTJobsDataPlaneServiceException_1 = require("../models/IoTJobsDataPlaneServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const se_DescribeJobExecutionCommand = async (input, context) => {
|
|
9
|
-
const
|
|
9
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
10
|
const headers = {};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
b.bp("/things/{thingName}/jobs/{jobId}");
|
|
12
|
+
b.p("jobId", () => input.jobId, "{jobId}", false);
|
|
13
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
14
14
|
const query = (0, smithy_client_1.map)({
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
[_iJD]: [() => input.includeJobDocument !== void 0, () => input[_iJD].toString()],
|
|
16
|
+
[_eN]: [() => input.executionNumber !== void 0, () => input[_eN].toString()],
|
|
17
17
|
});
|
|
18
18
|
let body;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
hostname,
|
|
22
|
-
port,
|
|
23
|
-
method: "GET",
|
|
24
|
-
headers,
|
|
25
|
-
path: resolvedPath,
|
|
26
|
-
query,
|
|
27
|
-
body,
|
|
28
|
-
});
|
|
19
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
20
|
+
return b.build();
|
|
29
21
|
};
|
|
30
22
|
exports.se_DescribeJobExecutionCommand = se_DescribeJobExecutionCommand;
|
|
31
23
|
const se_GetPendingJobExecutionsCommand = async (input, context) => {
|
|
32
|
-
const
|
|
24
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
33
25
|
const headers = {};
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
b.bp("/things/{thingName}/jobs");
|
|
27
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
36
28
|
let body;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
hostname,
|
|
40
|
-
port,
|
|
41
|
-
method: "GET",
|
|
42
|
-
headers,
|
|
43
|
-
path: resolvedPath,
|
|
44
|
-
body,
|
|
45
|
-
});
|
|
29
|
+
b.m("GET").h(headers).b(body);
|
|
30
|
+
return b.build();
|
|
46
31
|
};
|
|
47
32
|
exports.se_GetPendingJobExecutionsCommand = se_GetPendingJobExecutionsCommand;
|
|
48
33
|
const se_StartNextPendingJobExecutionCommand = async (input, context) => {
|
|
49
|
-
const
|
|
34
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
50
35
|
const headers = {
|
|
51
36
|
"content-type": "application/json",
|
|
52
37
|
};
|
|
53
|
-
|
|
54
|
-
|
|
38
|
+
b.bp("/things/{thingName}/jobs/$next");
|
|
39
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
55
40
|
let body;
|
|
56
41
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
57
42
|
statusDetails: (_) => (0, smithy_client_1._json)(_),
|
|
58
43
|
stepTimeoutInMinutes: [],
|
|
59
44
|
}));
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
hostname,
|
|
63
|
-
port,
|
|
64
|
-
method: "PUT",
|
|
65
|
-
headers,
|
|
66
|
-
path: resolvedPath,
|
|
67
|
-
body,
|
|
68
|
-
});
|
|
45
|
+
b.m("PUT").h(headers).b(body);
|
|
46
|
+
return b.build();
|
|
69
47
|
};
|
|
70
48
|
exports.se_StartNextPendingJobExecutionCommand = se_StartNextPendingJobExecutionCommand;
|
|
71
49
|
const se_UpdateJobExecutionCommand = async (input, context) => {
|
|
72
|
-
const
|
|
50
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
73
51
|
const headers = {
|
|
74
52
|
"content-type": "application/json",
|
|
75
53
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
54
|
+
b.bp("/things/{thingName}/jobs/{jobId}");
|
|
55
|
+
b.p("jobId", () => input.jobId, "{jobId}", false);
|
|
56
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
79
57
|
let body;
|
|
80
58
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
81
59
|
executionNumber: [],
|
|
@@ -86,15 +64,8 @@ const se_UpdateJobExecutionCommand = async (input, context) => {
|
|
|
86
64
|
statusDetails: (_) => (0, smithy_client_1._json)(_),
|
|
87
65
|
stepTimeoutInMinutes: [],
|
|
88
66
|
}));
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
hostname,
|
|
92
|
-
port,
|
|
93
|
-
method: "POST",
|
|
94
|
-
headers,
|
|
95
|
-
path: resolvedPath,
|
|
96
|
-
body,
|
|
97
|
-
});
|
|
67
|
+
b.m("POST").h(headers).b(body);
|
|
68
|
+
return b.build();
|
|
98
69
|
};
|
|
99
70
|
exports.se_UpdateJobExecutionCommand = se_UpdateJobExecutionCommand;
|
|
100
71
|
const de_DescribeJobExecutionCommand = async (output, context) => {
|
|
@@ -394,6 +365,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
394
365
|
value !== "" &&
|
|
395
366
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
396
367
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
368
|
+
const _eN = "executionNumber";
|
|
369
|
+
const _iJD = "includeJobDocument";
|
|
397
370
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
398
371
|
if (encoded.length) {
|
|
399
372
|
return JSON.parse(encoded);
|
|
@@ -1,75 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map,
|
|
1
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
2
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
3
|
import { IoTJobsDataPlaneServiceException as __BaseException } from "../models/IoTJobsDataPlaneServiceException";
|
|
4
4
|
import { CertificateValidationException, InvalidRequestException, InvalidStateTransitionException, ResourceNotFoundException, ServiceUnavailableException, TerminalStateException, ThrottlingException, } from "../models/models_0";
|
|
5
5
|
export const se_DescribeJobExecutionCommand = async (input, context) => {
|
|
6
|
-
const
|
|
6
|
+
const b = rb(input, context);
|
|
7
7
|
const headers = {};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
b.bp("/things/{thingName}/jobs/{jobId}");
|
|
9
|
+
b.p("jobId", () => input.jobId, "{jobId}", false);
|
|
10
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
11
11
|
const query = map({
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
[_iJD]: [() => input.includeJobDocument !== void 0, () => input[_iJD].toString()],
|
|
13
|
+
[_eN]: [() => input.executionNumber !== void 0, () => input[_eN].toString()],
|
|
14
14
|
});
|
|
15
15
|
let body;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
hostname,
|
|
19
|
-
port,
|
|
20
|
-
method: "GET",
|
|
21
|
-
headers,
|
|
22
|
-
path: resolvedPath,
|
|
23
|
-
query,
|
|
24
|
-
body,
|
|
25
|
-
});
|
|
16
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
17
|
+
return b.build();
|
|
26
18
|
};
|
|
27
19
|
export const se_GetPendingJobExecutionsCommand = async (input, context) => {
|
|
28
|
-
const
|
|
20
|
+
const b = rb(input, context);
|
|
29
21
|
const headers = {};
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
b.bp("/things/{thingName}/jobs");
|
|
23
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
32
24
|
let body;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
hostname,
|
|
36
|
-
port,
|
|
37
|
-
method: "GET",
|
|
38
|
-
headers,
|
|
39
|
-
path: resolvedPath,
|
|
40
|
-
body,
|
|
41
|
-
});
|
|
25
|
+
b.m("GET").h(headers).b(body);
|
|
26
|
+
return b.build();
|
|
42
27
|
};
|
|
43
28
|
export const se_StartNextPendingJobExecutionCommand = async (input, context) => {
|
|
44
|
-
const
|
|
29
|
+
const b = rb(input, context);
|
|
45
30
|
const headers = {
|
|
46
31
|
"content-type": "application/json",
|
|
47
32
|
};
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
b.bp("/things/{thingName}/jobs/$next");
|
|
34
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
50
35
|
let body;
|
|
51
36
|
body = JSON.stringify(take(input, {
|
|
52
37
|
statusDetails: (_) => _json(_),
|
|
53
38
|
stepTimeoutInMinutes: [],
|
|
54
39
|
}));
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
hostname,
|
|
58
|
-
port,
|
|
59
|
-
method: "PUT",
|
|
60
|
-
headers,
|
|
61
|
-
path: resolvedPath,
|
|
62
|
-
body,
|
|
63
|
-
});
|
|
40
|
+
b.m("PUT").h(headers).b(body);
|
|
41
|
+
return b.build();
|
|
64
42
|
};
|
|
65
43
|
export const se_UpdateJobExecutionCommand = async (input, context) => {
|
|
66
|
-
const
|
|
44
|
+
const b = rb(input, context);
|
|
67
45
|
const headers = {
|
|
68
46
|
"content-type": "application/json",
|
|
69
47
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
48
|
+
b.bp("/things/{thingName}/jobs/{jobId}");
|
|
49
|
+
b.p("jobId", () => input.jobId, "{jobId}", false);
|
|
50
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
73
51
|
let body;
|
|
74
52
|
body = JSON.stringify(take(input, {
|
|
75
53
|
executionNumber: [],
|
|
@@ -80,15 +58,8 @@ export const se_UpdateJobExecutionCommand = async (input, context) => {
|
|
|
80
58
|
statusDetails: (_) => _json(_),
|
|
81
59
|
stepTimeoutInMinutes: [],
|
|
82
60
|
}));
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
hostname,
|
|
86
|
-
port,
|
|
87
|
-
method: "POST",
|
|
88
|
-
headers,
|
|
89
|
-
path: resolvedPath,
|
|
90
|
-
body,
|
|
91
|
-
});
|
|
61
|
+
b.m("POST").h(headers).b(body);
|
|
62
|
+
return b.build();
|
|
92
63
|
};
|
|
93
64
|
export const de_DescribeJobExecutionCommand = async (output, context) => {
|
|
94
65
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -383,6 +354,8 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
383
354
|
value !== "" &&
|
|
384
355
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
385
356
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
357
|
+
const _eN = "executionNumber";
|
|
358
|
+
const _iJD = "includeJobDocument";
|
|
386
359
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
387
360
|
if (encoded.length) {
|
|
388
361
|
return JSON.parse(encoded);
|
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.478.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",
|
|
@@ -20,20 +20,21 @@
|
|
|
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.478.0",
|
|
24
|
+
"@aws-sdk/core": "3.477.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.478.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.468.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.468.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.468.0",
|
|
29
29
|
"@aws-sdk/middleware-signing": "3.468.0",
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.478.0",
|
|
31
31
|
"@aws-sdk/region-config-resolver": "3.470.0",
|
|
32
32
|
"@aws-sdk/types": "3.468.0",
|
|
33
|
-
"@aws-sdk/util-endpoints": "3.
|
|
33
|
+
"@aws-sdk/util-endpoints": "3.478.0",
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "3.468.0",
|
|
35
35
|
"@aws-sdk/util-user-agent-node": "3.470.0",
|
|
36
36
|
"@smithy/config-resolver": "^2.0.21",
|
|
37
|
+
"@smithy/core": "^1.2.0",
|
|
37
38
|
"@smithy/fetch-http-handler": "^2.3.1",
|
|
38
39
|
"@smithy/hash-node": "^2.0.17",
|
|
39
40
|
"@smithy/invalid-dependency": "^2.0.15",
|