@iotize/device-client.js
Version:
IoTize Device client for Javascript
212 lines (211 loc) • 6.59 kB
JavaScript
"use strict";
/**
* This file has been generated
* DO NOT EDIT, IT MAY BE OVERWRITTEN
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var abstract_service_1 = require("../abstract-service");
var AdpService = /** @class */ (function (_super) {
__extends(AdpService, _super);
function AdpService(client, apiConfig) {
var _this = _super.call(this, client, apiConfig) || this;
_this.resources = {
'getAdpStatus': {
path: "/target/adp/status",
methodType: "GET",
returnTypeConverter: "AdpStats"
},
'getControlIn': {
path: "/adp/control-in",
methodType: "GET",
returnTypeConverter: "AdpControlIn"
},
'getControlOut': {
path: "/adp/control-out",
methodType: "GET",
returnTypeConverter: "AdpControlOut"
},
'postAdpAction': {
path: "/target/adp/action",
methodType: "POST",
bodyEncoder: "Bytes"
},
'setAdpControlOut': {
path: "/adp/control-out",
methodType: "POST",
returnTypeConverter: "AdpControlOut",
bodyEncoder: "AdpControlOut"
},
'setControlIn': {
path: "/adp/control-in",
methodType: "POST",
bodyEncoder: "AdpControlIn"
},
};
return _this;
}
/**
* Read target status
*
* LWM2M path: /1027//36
* @tapVersion(">=1.0")
* @return AdpStats api call
*/
AdpService.prototype.getAdpStatus = function () {
var callOptions = this.getAdpStatusCall();
return this._call(callOptions);
};
/**
* Read target status
*
* LWM2M path: /1027//36
* @tapVersion(">=1.0")
* @return call options
*/
AdpService.prototype.getAdpStatusCall = function () {
var callOptions = this.resources.getAdpStatus;
return callOptions;
};
/**
* Get TAPNPass ADPCtrl1 Reg\"
*
* LWM2M path: /1027//41
* @tapVersion(">=1.51")
* @return AdpControlIn api call
*/
AdpService.prototype.getControlIn = function () {
var callOptions = this.getControlInCall();
return this._call(callOptions);
};
/**
* Get TAPNPass ADPCtrl1 Reg\"
*
* LWM2M path: /1027//41
* @tapVersion(">=1.51")
* @return call options
*/
AdpService.prototype.getControlInCall = function () {
var callOptions = this.resources.getControlIn;
return callOptions;
};
/**
* Direct access to TAPNPass ADPCtrl2 Reg
*
* LWM2M path: /1027//42
* @tapVersion(">=1.51")
* @return AdpControlOut api call
*/
AdpService.prototype.getControlOut = function () {
var callOptions = this.getControlOutCall();
return this._call(callOptions);
};
/**
* Direct access to TAPNPass ADPCtrl2 Reg
*
* LWM2M path: /1027//42
* @tapVersion(">=1.51")
* @return call options
*/
AdpService.prototype.getControlOutCall = function () {
var callOptions = this.resources.getControlOut;
return callOptions;
};
/**
* Perform actions to ADP target.
*
* LWM2M path: /1027//39
* Body converter id: "Bytes"
* @deprecated
* @tapVersion(">=1.0")
* @param data input
* @return void api call
*/
AdpService.prototype.postAdpAction = function (data) {
var callOptions = this.postAdpActionCall(data);
return this._call(callOptions);
};
/**
* Perform actions to ADP target.
*
* LWM2M path: /1027//39
* Body converter id: "Bytes"
* @deprecated
* @tapVersion(">=1.0")
* @param data input
* @return call options
*/
AdpService.prototype.postAdpActionCall = function (data) {
var callOptions = this.resources.postAdpAction;
callOptions.body = data;
callOptions.pathParameters = {};
return callOptions;
};
/**
* Direct access to TAPNPass ADPCtrl2 Reg
*
* LWM2M path: /1027//42
* Body converter id: "AdpControlOut"
* @tapVersion(">=1.51")
* @param data input
* @return AdpControlOut api call
*/
AdpService.prototype.setAdpControlOut = function (data) {
var callOptions = this.setAdpControlOutCall(data);
return this._call(callOptions);
};
/**
* Direct access to TAPNPass ADPCtrl2 Reg
*
* LWM2M path: /1027//42
* Body converter id: "AdpControlOut"
* @tapVersion(">=1.51")
* @param data input
* @return call options
*/
AdpService.prototype.setAdpControlOutCall = function (data) {
var callOptions = this.resources.setAdpControlOut;
callOptions.body = data;
callOptions.pathParameters = {};
return callOptions;
};
/**
* Direct access to TAPNPass ADPCtrl1 Reg
*
* LWM2M path: /1027//41
* Body converter id: "AdpControlIn"
* @tapVersion(">=1.51")
* @param data input
* @return void api call
*/
AdpService.prototype.setControlIn = function (data) {
var callOptions = this.setControlInCall(data);
return this._call(callOptions);
};
/**
* Direct access to TAPNPass ADPCtrl1 Reg
*
* LWM2M path: /1027//41
* Body converter id: "AdpControlIn"
* @tapVersion(">=1.51")
* @param data input
* @return call options
*/
AdpService.prototype.setControlInCall = function (data) {
var callOptions = this.resources.setControlIn;
callOptions.body = data;
callOptions.pathParameters = {};
return callOptions;
};
return AdpService;
}(abstract_service_1.AbstractService));
exports.AdpService = AdpService;