@aws-sdk/client-iot-jobs-data-plane 3.315.0 → 3.316.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,67 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IoTJobsDataPlane = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const DescribeJobExecutionCommand_1 = require("./commands/DescribeJobExecutionCommand");
5
6
  const GetPendingJobExecutionsCommand_1 = require("./commands/GetPendingJobExecutionsCommand");
6
7
  const StartNextPendingJobExecutionCommand_1 = require("./commands/StartNextPendingJobExecutionCommand");
7
8
  const UpdateJobExecutionCommand_1 = require("./commands/UpdateJobExecutionCommand");
8
9
  const IoTJobsDataPlaneClient_1 = require("./IoTJobsDataPlaneClient");
10
+ const commands = {
11
+ DescribeJobExecutionCommand: DescribeJobExecutionCommand_1.DescribeJobExecutionCommand,
12
+ GetPendingJobExecutionsCommand: GetPendingJobExecutionsCommand_1.GetPendingJobExecutionsCommand,
13
+ StartNextPendingJobExecutionCommand: StartNextPendingJobExecutionCommand_1.StartNextPendingJobExecutionCommand,
14
+ UpdateJobExecutionCommand: UpdateJobExecutionCommand_1.UpdateJobExecutionCommand,
15
+ };
9
16
  class IoTJobsDataPlane extends IoTJobsDataPlaneClient_1.IoTJobsDataPlaneClient {
10
- describeJobExecution(args, optionsOrCb, cb) {
11
- const command = new DescribeJobExecutionCommand_1.DescribeJobExecutionCommand(args);
12
- if (typeof optionsOrCb === "function") {
13
- this.send(command, optionsOrCb);
14
- }
15
- else if (typeof cb === "function") {
16
- if (typeof optionsOrCb !== "object")
17
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
18
- this.send(command, optionsOrCb || {}, cb);
19
- }
20
- else {
21
- return this.send(command, optionsOrCb);
22
- }
23
- }
24
- getPendingJobExecutions(args, optionsOrCb, cb) {
25
- const command = new GetPendingJobExecutionsCommand_1.GetPendingJobExecutionsCommand(args);
26
- if (typeof optionsOrCb === "function") {
27
- this.send(command, optionsOrCb);
28
- }
29
- else if (typeof cb === "function") {
30
- if (typeof optionsOrCb !== "object")
31
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
32
- this.send(command, optionsOrCb || {}, cb);
33
- }
34
- else {
35
- return this.send(command, optionsOrCb);
36
- }
37
- }
38
- startNextPendingJobExecution(args, optionsOrCb, cb) {
39
- const command = new StartNextPendingJobExecutionCommand_1.StartNextPendingJobExecutionCommand(args);
40
- if (typeof optionsOrCb === "function") {
41
- this.send(command, optionsOrCb);
42
- }
43
- else if (typeof cb === "function") {
44
- if (typeof optionsOrCb !== "object")
45
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
46
- this.send(command, optionsOrCb || {}, cb);
47
- }
48
- else {
49
- return this.send(command, optionsOrCb);
50
- }
51
- }
52
- updateJobExecution(args, optionsOrCb, cb) {
53
- const command = new UpdateJobExecutionCommand_1.UpdateJobExecutionCommand(args);
54
- if (typeof optionsOrCb === "function") {
55
- this.send(command, optionsOrCb);
56
- }
57
- else if (typeof cb === "function") {
58
- if (typeof optionsOrCb !== "object")
59
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
60
- this.send(command, optionsOrCb || {}, cb);
61
- }
62
- else {
63
- return this.send(command, optionsOrCb);
64
- }
65
- }
66
17
  }
67
18
  exports.IoTJobsDataPlane = IoTJobsDataPlane;
19
+ (0, smithy_client_1.createAggregatedClient)(commands, IoTJobsDataPlane);
@@ -1,63 +1,15 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { DescribeJobExecutionCommand, } from "./commands/DescribeJobExecutionCommand";
2
3
  import { GetPendingJobExecutionsCommand, } from "./commands/GetPendingJobExecutionsCommand";
3
4
  import { StartNextPendingJobExecutionCommand, } from "./commands/StartNextPendingJobExecutionCommand";
4
5
  import { UpdateJobExecutionCommand, } from "./commands/UpdateJobExecutionCommand";
5
6
  import { IoTJobsDataPlaneClient } from "./IoTJobsDataPlaneClient";
7
+ const commands = {
8
+ DescribeJobExecutionCommand,
9
+ GetPendingJobExecutionsCommand,
10
+ StartNextPendingJobExecutionCommand,
11
+ UpdateJobExecutionCommand,
12
+ };
6
13
  export class IoTJobsDataPlane extends IoTJobsDataPlaneClient {
7
- describeJobExecution(args, optionsOrCb, cb) {
8
- const command = new DescribeJobExecutionCommand(args);
9
- if (typeof optionsOrCb === "function") {
10
- this.send(command, optionsOrCb);
11
- }
12
- else if (typeof cb === "function") {
13
- if (typeof optionsOrCb !== "object")
14
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
15
- this.send(command, optionsOrCb || {}, cb);
16
- }
17
- else {
18
- return this.send(command, optionsOrCb);
19
- }
20
- }
21
- getPendingJobExecutions(args, optionsOrCb, cb) {
22
- const command = new GetPendingJobExecutionsCommand(args);
23
- if (typeof optionsOrCb === "function") {
24
- this.send(command, optionsOrCb);
25
- }
26
- else if (typeof cb === "function") {
27
- if (typeof optionsOrCb !== "object")
28
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
29
- this.send(command, optionsOrCb || {}, cb);
30
- }
31
- else {
32
- return this.send(command, optionsOrCb);
33
- }
34
- }
35
- startNextPendingJobExecution(args, optionsOrCb, cb) {
36
- const command = new StartNextPendingJobExecutionCommand(args);
37
- if (typeof optionsOrCb === "function") {
38
- this.send(command, optionsOrCb);
39
- }
40
- else if (typeof cb === "function") {
41
- if (typeof optionsOrCb !== "object")
42
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
43
- this.send(command, optionsOrCb || {}, cb);
44
- }
45
- else {
46
- return this.send(command, optionsOrCb);
47
- }
48
- }
49
- updateJobExecution(args, optionsOrCb, cb) {
50
- const command = new UpdateJobExecutionCommand(args);
51
- if (typeof optionsOrCb === "function") {
52
- this.send(command, optionsOrCb);
53
- }
54
- else if (typeof cb === "function") {
55
- if (typeof optionsOrCb !== "object")
56
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
57
- this.send(command, optionsOrCb || {}, cb);
58
- }
59
- else {
60
- return this.send(command, optionsOrCb);
61
- }
62
- }
63
14
  }
15
+ createAggregatedClient(commands, IoTJobsDataPlane);
@@ -4,47 +4,45 @@ import { GetPendingJobExecutionsCommandInput, GetPendingJobExecutionsCommandOutp
4
4
  import { StartNextPendingJobExecutionCommandInput, StartNextPendingJobExecutionCommandOutput } from "./commands/StartNextPendingJobExecutionCommand";
5
5
  import { UpdateJobExecutionCommandInput, UpdateJobExecutionCommandOutput } from "./commands/UpdateJobExecutionCommand";
6
6
  import { IoTJobsDataPlaneClient } from "./IoTJobsDataPlaneClient";
7
- /**
8
- * @public
9
- * <p>AWS IoT Jobs is a service that allows you to define a set of jobs — remote operations that are sent to
10
- * and executed on one or more devices connected to AWS IoT. For example, you can define a job that instructs a
11
- * set of devices to download and install application or firmware updates, reboot, rotate certificates, or perform
12
- * remote troubleshooting operations.</p>
13
- * <p> To create a job, you make a job document which is a description of the remote operations to be
14
- * performed, and you specify a list of targets that should perform the operations. The targets can be individual
15
- * things, thing groups or both.</p>
16
- * <p> AWS IoT Jobs sends a message to inform the targets that a job is available. The target starts the
17
- * execution of the job by downloading the job document, performing the operations it specifies, and reporting its
18
- * progress to AWS IoT. The Jobs service provides commands to track the progress of a job on a specific target and
19
- * for all the targets of the job</p>
20
- */
21
- export declare class IoTJobsDataPlane extends IoTJobsDataPlaneClient {
7
+ export interface IoTJobsDataPlane {
22
8
  /**
23
- * @public
24
- * <p>Gets details of a job execution.</p>
9
+ * @see {@link DescribeJobExecutionCommand}
25
10
  */
26
11
  describeJobExecution(args: DescribeJobExecutionCommandInput, options?: __HttpHandlerOptions): Promise<DescribeJobExecutionCommandOutput>;
27
12
  describeJobExecution(args: DescribeJobExecutionCommandInput, cb: (err: any, data?: DescribeJobExecutionCommandOutput) => void): void;
28
13
  describeJobExecution(args: DescribeJobExecutionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeJobExecutionCommandOutput) => void): void;
29
14
  /**
30
- * @public
31
- * <p>Gets the list of all jobs for a thing that are not in a terminal status.</p>
15
+ * @see {@link GetPendingJobExecutionsCommand}
32
16
  */
33
17
  getPendingJobExecutions(args: GetPendingJobExecutionsCommandInput, options?: __HttpHandlerOptions): Promise<GetPendingJobExecutionsCommandOutput>;
34
18
  getPendingJobExecutions(args: GetPendingJobExecutionsCommandInput, cb: (err: any, data?: GetPendingJobExecutionsCommandOutput) => void): void;
35
19
  getPendingJobExecutions(args: GetPendingJobExecutionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPendingJobExecutionsCommandOutput) => void): void;
36
20
  /**
37
- * @public
38
- * <p>Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.</p>
21
+ * @see {@link StartNextPendingJobExecutionCommand}
39
22
  */
40
23
  startNextPendingJobExecution(args: StartNextPendingJobExecutionCommandInput, options?: __HttpHandlerOptions): Promise<StartNextPendingJobExecutionCommandOutput>;
41
24
  startNextPendingJobExecution(args: StartNextPendingJobExecutionCommandInput, cb: (err: any, data?: StartNextPendingJobExecutionCommandOutput) => void): void;
42
25
  startNextPendingJobExecution(args: StartNextPendingJobExecutionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartNextPendingJobExecutionCommandOutput) => void): void;
43
26
  /**
44
- * @public
45
- * <p>Updates the status of a job execution.</p>
27
+ * @see {@link UpdateJobExecutionCommand}
46
28
  */
47
29
  updateJobExecution(args: UpdateJobExecutionCommandInput, options?: __HttpHandlerOptions): Promise<UpdateJobExecutionCommandOutput>;
48
30
  updateJobExecution(args: UpdateJobExecutionCommandInput, cb: (err: any, data?: UpdateJobExecutionCommandOutput) => void): void;
49
31
  updateJobExecution(args: UpdateJobExecutionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateJobExecutionCommandOutput) => void): void;
50
32
  }
33
+ /**
34
+ * @public
35
+ * <p>AWS IoT Jobs is a service that allows you to define a set of jobs — remote operations that are sent to
36
+ * and executed on one or more devices connected to AWS IoT. For example, you can define a job that instructs a
37
+ * set of devices to download and install application or firmware updates, reboot, rotate certificates, or perform
38
+ * remote troubleshooting operations.</p>
39
+ * <p> To create a job, you make a job document which is a description of the remote operations to be
40
+ * performed, and you specify a list of targets that should perform the operations. The targets can be individual
41
+ * things, thing groups or both.</p>
42
+ * <p> AWS IoT Jobs sends a message to inform the targets that a job is available. The target starts the
43
+ * execution of the job by downloading the job document, performing the operations it specifies, and reporting its
44
+ * progress to AWS IoT. The Jobs service provides commands to track the progress of a job on a specific target and
45
+ * for all the targets of the job</p>
46
+ */
47
+ export declare class IoTJobsDataPlane extends IoTJobsDataPlaneClient implements IoTJobsDataPlane {
48
+ }
@@ -16,7 +16,7 @@ import {
16
16
  UpdateJobExecutionCommandOutput,
17
17
  } from "./commands/UpdateJobExecutionCommand";
18
18
  import { IoTJobsDataPlaneClient } from "./IoTJobsDataPlaneClient";
19
- export declare class IoTJobsDataPlane extends IoTJobsDataPlaneClient {
19
+ export interface IoTJobsDataPlane {
20
20
  describeJobExecution(
21
21
  args: DescribeJobExecutionCommandInput,
22
22
  options?: __HttpHandlerOptions
@@ -70,3 +70,6 @@ export declare class IoTJobsDataPlane extends IoTJobsDataPlaneClient {
70
70
  cb: (err: any, data?: UpdateJobExecutionCommandOutput) => void
71
71
  ): void;
72
72
  }
73
+ export declare class IoTJobsDataPlane
74
+ extends IoTJobsDataPlaneClient
75
+ implements IoTJobsDataPlane {}
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.315.0",
4
+ "version": "3.316.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,9 +21,9 @@
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.315.0",
24
+ "@aws-sdk/client-sts": "3.316.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.315.0",
26
+ "@aws-sdk/credential-provider-node": "3.316.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.315.0",
43
+ "@aws-sdk/smithy-client": "3.316.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.315.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.316.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.316.0",
51
51
  "@aws-sdk/util-endpoints": "3.310.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",