@softchef/cdk-iot-device-management
Version:
IoT device management is composed of things, thing types, thing groups, jobs, files API services. The constructs can be used independently, that are based on full-managed service to create an API Gateway & Lambda function.
116 lines (115 loc) • 4.92 kB
JavaScript
import { __extends } from "tslib";
import { DeleteThingShadowCommand, } from "./commands/DeleteThingShadowCommand";
import { GetRetainedMessageCommand, } from "./commands/GetRetainedMessageCommand";
import { GetThingShadowCommand, } from "./commands/GetThingShadowCommand";
import { ListNamedShadowsForThingCommand, } from "./commands/ListNamedShadowsForThingCommand";
import { ListRetainedMessagesCommand, } from "./commands/ListRetainedMessagesCommand";
import { PublishCommand } from "./commands/PublishCommand";
import { UpdateThingShadowCommand, } from "./commands/UpdateThingShadowCommand";
import { IoTDataPlaneClient } from "./IoTDataPlaneClient";
var IoTDataPlane = (function (_super) {
__extends(IoTDataPlane, _super);
function IoTDataPlane() {
return _super !== null && _super.apply(this, arguments) || this;
}
IoTDataPlane.prototype.deleteThingShadow = function (args, optionsOrCb, cb) {
var command = new DeleteThingShadowCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error("Expect http options but get " + typeof optionsOrCb);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
};
IoTDataPlane.prototype.getRetainedMessage = function (args, optionsOrCb, cb) {
var command = new GetRetainedMessageCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error("Expect http options but get " + typeof optionsOrCb);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
};
IoTDataPlane.prototype.getThingShadow = function (args, optionsOrCb, cb) {
var command = new GetThingShadowCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error("Expect http options but get " + typeof optionsOrCb);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
};
IoTDataPlane.prototype.listNamedShadowsForThing = function (args, optionsOrCb, cb) {
var command = new ListNamedShadowsForThingCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error("Expect http options but get " + typeof optionsOrCb);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
};
IoTDataPlane.prototype.listRetainedMessages = function (args, optionsOrCb, cb) {
var command = new ListRetainedMessagesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error("Expect http options but get " + typeof optionsOrCb);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
};
IoTDataPlane.prototype.publish = function (args, optionsOrCb, cb) {
var command = new PublishCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error("Expect http options but get " + typeof optionsOrCb);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
};
IoTDataPlane.prototype.updateThingShadow = function (args, optionsOrCb, cb) {
var command = new UpdateThingShadowCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
}
else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object")
throw new Error("Expect http options but get " + typeof optionsOrCb);
this.send(command, optionsOrCb || {}, cb);
}
else {
return this.send(command, optionsOrCb);
}
};
return IoTDataPlane;
}(IoTDataPlaneClient));
export { IoTDataPlane };