@iotize/device-client.js
Version:
IoTize Device client for Javascript
308 lines (307 loc) • 10.1 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 DataLogService = /** @class */ (function (_super) {
__extends(DataLogService, _super);
function DataLogService(client, apiConfig) {
var _this = _super.call(this, client, apiConfig) || this;
_this.resources = {
'dequeueOnePacket': {
path: "/data-log/dequeue-packet",
methodType: "GET",
returnTypeConverter: "SinglePacket"
},
'flush': {
path: "/data-log/flush",
methodType: "POST"
},
'getMaxPacketCount': {
path: "/data-log/max-packet-count",
methodType: "GET",
returnTypeConverter: "integer_uint16"
},
'getOptions': {
path: "/data-log/options",
methodType: "GET",
returnTypeConverter: "DataLogOption"
},
'getPacketCount': {
path: "/data-log/packet-count",
methodType: "GET",
returnTypeConverter: "integer_uint16"
},
'isRunning': {
path: "/data-log/run",
methodType: "GET",
returnTypeConverter: "boolean"
},
'putCryptoKey': {
path: "/data-log/crypto-key",
methodType: "PUT",
bodyEncoder: "Bytes"
},
'putOptions': {
path: "/data-log/options",
methodType: "PUT",
bodyEncoder: "DataLogOption"
},
'run': {
path: "/data-log/run",
methodType: "POST"
},
'stop': {
path: "/data-log/stop",
methodType: "POST"
},
};
return _this;
}
/**
* Dequeue one packet
* Dequeue one packet in the FIFO list (Firt In First Out) of data-log packets
* LWM2M path: /1031//11
* @tapVersion(">=1.0")
* @return SinglePacket api call
*/
DataLogService.prototype.dequeueOnePacket = function () {
var callOptions = this.dequeueOnePacketCall();
return this._call(callOptions);
};
/**
* Dequeue one packet
* Dequeue one packet in the FIFO list (Firt In First Out) of data-log packets
* LWM2M path: /1031//11
* @tapVersion(">=1.0")
* @return call options
*/
DataLogService.prototype.dequeueOnePacketCall = function () {
var callOptions = this.resources.dequeueOnePacket;
return callOptions;
};
/**
* Flush data log packets
* Reinitialisation : efface tous les paquets de la mémoire de l'IoTize. Seulement en état Stop ? Stop implicite avant le flush ? Run implicite après le flush ?
* LWM2M path: /1031//4
* @tapVersion(">=1.0")
* @return void api call
*/
DataLogService.prototype.flush = function () {
var callOptions = this.flushCall();
return this._call(callOptions);
};
/**
* Flush data log packets
* Reinitialisation : efface tous les paquets de la mémoire de l'IoTize. Seulement en état Stop ? Stop implicite avant le flush ? Run implicite après le flush ?
* LWM2M path: /1031//4
* @tapVersion(">=1.0")
* @return call options
*/
DataLogService.prototype.flushCall = function () {
var callOptions = this.resources.flush;
return callOptions;
};
/**
* Get the maximum number of packet
*
* LWM2M path: /1024//23
* @tapVersion(">=1.0")
* @return number api call
*/
DataLogService.prototype.getMaxPacketCount = function () {
var callOptions = this.getMaxPacketCountCall();
return this._call(callOptions);
};
/**
* Get the maximum number of packet
*
* LWM2M path: /1024//23
* @tapVersion(">=1.0")
* @return call options
*/
DataLogService.prototype.getMaxPacketCountCall = function () {
var callOptions = this.resources.getMaxPacketCount;
return callOptions;
};
/**
* Get data log options
*
* LWM2M path: /1031//2
* @tapVersion(">=1.0")
* @return DataLogOption api call
*/
DataLogService.prototype.getOptions = function () {
var callOptions = this.getOptionsCall();
return this._call(callOptions);
};
/**
* Get data log options
*
* LWM2M path: /1031//2
* @tapVersion(">=1.0")
* @return call options
*/
DataLogService.prototype.getOptionsCall = function () {
var callOptions = this.resources.getOptions;
return callOptions;
};
/**
* Get number of pending data-log packet
* Get the number of data log packet available
* LWM2M path: /1031//10
* @tapVersion(">=1.0")
* @return number api call
*/
DataLogService.prototype.getPacketCount = function () {
var callOptions = this.getPacketCountCall();
return this._call(callOptions);
};
/**
* Get number of pending data-log packet
* Get the number of data log packet available
* LWM2M path: /1031//10
* @tapVersion(">=1.0")
* @return call options
*/
DataLogService.prototype.getPacketCountCall = function () {
var callOptions = this.resources.getPacketCount;
return callOptions;
};
/**
* Returns true is data log acquisition is running
*
* LWM2M path: /1031//0
* @tapVersion(">=1.0")
* @return boolean api call
*/
DataLogService.prototype.isRunning = function () {
var callOptions = this.isRunningCall();
return this._call(callOptions);
};
/**
* Returns true is data log acquisition is running
*
* LWM2M path: /1031//0
* @tapVersion(">=1.0")
* @return call options
*/
DataLogService.prototype.isRunningCall = function () {
var callOptions = this.resources.isRunning;
return callOptions;
};
/**
* Write data log crypto key
* Hash du password Dataloggin. Utilisé (combiné à d'autres choses) pour crypter le paquet avant de le stocker dans l'OutBox.
* LWM2M path: /1031//3
* Body converter id: "Bytes"
* @tapVersion(">=1.0")
* @param value input
* @return void api call
*/
DataLogService.prototype.putCryptoKey = function (value) {
var callOptions = this.putCryptoKeyCall(value);
return this._call(callOptions);
};
/**
* Write data log crypto key
* Hash du password Dataloggin. Utilisé (combiné à d'autres choses) pour crypter le paquet avant de le stocker dans l'OutBox.
* LWM2M path: /1031//3
* Body converter id: "Bytes"
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
DataLogService.prototype.putCryptoKeyCall = function (value) {
var callOptions = this.resources.putCryptoKey;
callOptions.body = value;
callOptions.pathParameters = {};
return callOptions;
};
/**
* Write data log option
*
* LWM2M path: /1031//2
* Body converter id: "DataLogOption"
* @tapVersion(">=1.0")
* @param value input
* @return void api call
*/
DataLogService.prototype.putOptions = function (value) {
var callOptions = this.putOptionsCall(value);
return this._call(callOptions);
};
/**
* Write data log option
*
* LWM2M path: /1031//2
* Body converter id: "DataLogOption"
* @tapVersion(">=1.0")
* @param value input
* @return call options
*/
DataLogService.prototype.putOptionsCall = function (value) {
var callOptions = this.resources.putOptions;
callOptions.body = value;
callOptions.pathParameters = {};
return callOptions;
};
/**
* Run data-log acquisition
* Start data log packet acquisition
* LWM2M path: /1031//0
* @tapVersion(">=1.0")
* @return void api call
*/
DataLogService.prototype.run = function () {
var callOptions = this.runCall();
return this._call(callOptions);
};
/**
* Run data-log acquisition
* Start data log packet acquisition
* LWM2M path: /1031//0
* @tapVersion(">=1.0")
* @return call options
*/
DataLogService.prototype.runCall = function () {
var callOptions = this.resources.run;
return callOptions;
};
/**
* Stop data-log acquisition
* Stop data log packet acquisition
* LWM2M path: /1031//1
* @tapVersion(">=1.0")
* @return void api call
*/
DataLogService.prototype.stop = function () {
var callOptions = this.stopCall();
return this._call(callOptions);
};
/**
* Stop data-log acquisition
* Stop data log packet acquisition
* LWM2M path: /1031//1
* @tapVersion(">=1.0")
* @return call options
*/
DataLogService.prototype.stopCall = function () {
var callOptions = this.resources.stop;
return callOptions;
};
return DataLogService;
}(abstract_service_1.AbstractService));
exports.DataLogService = DataLogService;