UNPKG

@iotize/device-client.js

Version:

IoTize Device client for Javascript

123 lines (122 loc) 3.96 kB
"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 SecureElementService = /** @class */ (function (_super) { __extends(SecureElementService, _super); function SecureElementService(client, apiConfig) { var _this = _super.call(this, client, apiConfig) || this; _this.resources = { 'getConfig': { path: "/secure-element/config", methodType: "GET", returnTypeConverter: "Bytes" }, 'send': { path: "/secure-element/send", methodType: "GET", returnTypeConverter: "Bytes", bodyEncoder: "Bytes" }, 'setConfig': { path: "/secure-element/config", methodType: "PUT", bodyEncoder: "Bytes" }, }; return _this; } /** * Get configuration of Secure Element * * LWM2M path: /1024//70 * @tapVersion(">=1.0") * @return Uint8Array api call */ SecureElementService.prototype.getConfig = function () { var callOptions = this.getConfigCall(); return this._call(callOptions); }; /** * Get configuration of Secure Element * * LWM2M path: /1024//70 * @tapVersion(">=1.0") * @return call options */ SecureElementService.prototype.getConfigCall = function () { var callOptions = this.resources.getConfig; return callOptions; }; /** * Crypted communication channel * * LWM2M path: /1024//71 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param data input * @return Uint8Array api call */ SecureElementService.prototype.send = function (data) { var callOptions = this.sendCall(data); return this._call(callOptions); }; /** * Crypted communication channel * * LWM2M path: /1024//71 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param data input * @return call options */ SecureElementService.prototype.sendCall = function (data) { var callOptions = this.resources.send; callOptions.body = data; callOptions.pathParameters = {}; return callOptions; }; /** * Write secure element configuration * * LWM2M path: /1024//70 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param conf input * @return void api call */ SecureElementService.prototype.setConfig = function (conf) { var callOptions = this.setConfigCall(conf); return this._call(callOptions); }; /** * Write secure element configuration * * LWM2M path: /1024//70 * Body converter id: "Bytes" * @tapVersion(">=1.0") * @param conf input * @return call options */ SecureElementService.prototype.setConfigCall = function (conf) { var callOptions = this.resources.setConfig; callOptions.body = conf; callOptions.pathParameters = {}; return callOptions; }; return SecureElementService; }(abstract_service_1.AbstractService)); exports.SecureElementService = SecureElementService;