UNPKG

@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.

209 lines (208 loc) 8.68 kB
import { __extends } from "tslib"; import { BatchExecuteStatementCommand, } from "./commands/BatchExecuteStatementCommand"; import { BatchGetCommand } from "./commands/BatchGetCommand"; import { BatchWriteCommand } from "./commands/BatchWriteCommand"; import { DeleteCommand } from "./commands/DeleteCommand"; import { ExecuteStatementCommand, } from "./commands/ExecuteStatementCommand"; import { ExecuteTransactionCommand, } from "./commands/ExecuteTransactionCommand"; import { GetCommand } from "./commands/GetCommand"; import { PutCommand } from "./commands/PutCommand"; import { QueryCommand } from "./commands/QueryCommand"; import { ScanCommand } from "./commands/ScanCommand"; import { TransactGetCommand } from "./commands/TransactGetCommand"; import { TransactWriteCommand, } from "./commands/TransactWriteCommand"; import { UpdateCommand } from "./commands/UpdateCommand"; import { DynamoDBDocumentClient } from "./DynamoDBDocumentClient"; var DynamoDBDocument = (function (_super) { __extends(DynamoDBDocument, _super); function DynamoDBDocument() { return _super !== null && _super.apply(this, arguments) || this; } DynamoDBDocument.from = function (client, translateConfig) { return new DynamoDBDocument(client, translateConfig); }; DynamoDBDocument.prototype.batchExecuteStatement = function (args, optionsOrCb, cb) { var command = new BatchExecuteStatementCommand(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); } }; DynamoDBDocument.prototype.batchGet = function (args, optionsOrCb, cb) { var command = new BatchGetCommand(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); } }; DynamoDBDocument.prototype.batchWrite = function (args, optionsOrCb, cb) { var command = new BatchWriteCommand(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); } }; DynamoDBDocument.prototype.delete = function (args, optionsOrCb, cb) { var command = new DeleteCommand(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); } }; DynamoDBDocument.prototype.executeStatement = function (args, optionsOrCb, cb) { var command = new ExecuteStatementCommand(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); } }; DynamoDBDocument.prototype.executeTransaction = function (args, optionsOrCb, cb) { var command = new ExecuteTransactionCommand(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); } }; DynamoDBDocument.prototype.get = function (args, optionsOrCb, cb) { var command = new GetCommand(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); } }; DynamoDBDocument.prototype.put = function (args, optionsOrCb, cb) { var command = new PutCommand(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); } }; DynamoDBDocument.prototype.query = function (args, optionsOrCb, cb) { var command = new QueryCommand(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); } }; DynamoDBDocument.prototype.scan = function (args, optionsOrCb, cb) { var command = new ScanCommand(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); } }; DynamoDBDocument.prototype.transactGet = function (args, optionsOrCb, cb) { var command = new TransactGetCommand(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); } }; DynamoDBDocument.prototype.transactWrite = function (args, optionsOrCb, cb) { var command = new TransactWriteCommand(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); } }; DynamoDBDocument.prototype.update = function (args, optionsOrCb, cb) { var command = new UpdateCommand(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 DynamoDBDocument; }(DynamoDBDocumentClient)); export { DynamoDBDocument };