UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

495 lines 20.2 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.AssetTemplateApi = void 0; var SDKModels_1 = require("./SDKModels"); var core_1 = require("../core"); var XompassClient_1 = require("../../XompassClient"); /** * Api services for the `AssetTemplate` model. */ var AssetTemplateApi = /** @class */ (function (_super) { __extends(AssetTemplateApi, _super); function AssetTemplateApi() { return _super !== null && _super.apply(this, arguments) || this; } AssetTemplateApi.getConfig = function (id, refresh, retry) { if (refresh === void 0) { refresh = {}; } if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/config' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; if (typeof refresh !== 'undefined' && refresh !== null) { _urlParams['refresh'] = refresh; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.createConfig = function (id, data, retry) { if (data === void 0) { data = {}; } if (retry === void 0) { retry = false; } var _method = 'POST'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/config' ].join(''); var _routeParams = { id: id }; var _postBody = data; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.updateConfig = function (id, data, retry) { if (data === void 0) { data = {}; } if (retry === void 0) { retry = false; } var _method = 'PUT'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/config' ].join(''); var _routeParams = { id: id }; var _postBody = data; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.destroyConfig = function (id, retry) { if (retry === void 0) { retry = false; } var _method = 'DELETE'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/config' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.getContainer = function (id, refresh, retry) { if (refresh === void 0) { refresh = {}; } if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; if (typeof refresh !== 'undefined' && refresh !== null) { _urlParams['refresh'] = refresh; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.createContainer = function (id, data, retry) { if (data === void 0) { data = {}; } if (retry === void 0) { retry = false; } var _method = 'POST'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container' ].join(''); var _routeParams = { id: id }; var _postBody = data; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.updateContainer = function (id, data, retry) { if (data === void 0) { data = {}; } if (retry === void 0) { retry = false; } var _method = 'PUT'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container' ].join(''); var _routeParams = { id: id }; var _postBody = data; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.destroyContainer = function (id, retry) { if (retry === void 0) { retry = false; } var _method = 'DELETE'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.findByIdTrackingLogs = function (id, fk, retry) { if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/trackingLogs/:fk' ].join(''); var _routeParams = { id: id, fk: fk }; var _postBody = {}; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.getProject = function (id, refresh, retry) { if (refresh === void 0) { refresh = {}; } if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/project' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; if (typeof refresh !== 'undefined' && refresh !== null) { _urlParams['refresh'] = refresh; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.findByIdSensorTemplates = function (id, fk, retry) { if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/sensorTemplates/:fk' ].join(''); var _routeParams = { id: id, fk: fk }; var _postBody = {}; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.updateByIdSensorTemplates = function (id, fk, data, retry) { if (data === void 0) { data = {}; } if (retry === void 0) { retry = false; } var _method = 'PUT'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/sensorTemplates/:fk' ].join(''); var _routeParams = { id: id, fk: fk }; var _postBody = data; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.getTrackingLogs = function (id, filter, retry) { if (filter === void 0) { filter = {}; } if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/trackingLogs' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; if (typeof filter !== 'undefined' && filter !== null) { _urlParams['filter'] = filter; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.countTrackingLogs = function (id, where, retry) { if (where === void 0) { where = {}; } if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/trackingLogs/count' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; if (typeof where !== 'undefined' && where !== null) { _urlParams['where'] = where; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.getSensorTemplates = function (id, filter, retry) { if (filter === void 0) { filter = {}; } if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/sensorTemplates' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; if (typeof filter !== 'undefined' && filter !== null) { _urlParams['filter'] = filter; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.createSensorTemplates = function (id, data, retry) { if (data === void 0) { data = {}; } if (retry === void 0) { retry = false; } var _method = 'POST'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/sensorTemplates' ].join(''); var _routeParams = { id: id }; var _postBody = data; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.countSensorTemplates = function (id, where, retry) { if (where === void 0) { where = {}; } if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/sensorTemplates/count' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; if (typeof where !== 'undefined' && where !== null) { _urlParams['where'] = where; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.subscribe = function (id, socketId, retry) { if (retry === void 0) { retry = false; } var _method = 'PUT'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/sockets/:socketId/subscribe' ].join(''); var _routeParams = { id: id, socketId: socketId }; var _postBody = {}; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.unsubscribe = function (id, socketId, retry) { if (retry === void 0) { retry = false; } var _method = 'DELETE'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/sockets/:socketId/unsubscribe' ].join(''); var _routeParams = { id: id, socketId: socketId }; var _postBody = {}; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.getContainerInfo = function (id, retry) { if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container/info' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.getFiles = function (id, retry) { if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container/files' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.getFile = function (id, file, retry) { if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container/files/:file' ].join(''); var _routeParams = { id: id, file: file }; var _postBody = {}; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.removeFile = function (id, property, file, retry) { if (retry === void 0) { retry = false; } var _method = 'DELETE'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container/files/:file' ].join(''); var _routeParams = { id: id, file: file }; var _postBody = {}; var _urlParams = {}; if (typeof property !== 'undefined' && property !== null) { _urlParams['property'] = property; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.upload = function (id, property, retry) { if (retry === void 0) { retry = false; } var _method = 'POST'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container/upload' ].join(''); var _routeParams = { id: id }; var _postBody = {}; var _urlParams = {}; if (typeof property !== 'undefined' && property !== null) { _urlParams['property'] = property; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.download = function (id, property, file, retry) { if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/container/download/:file' ].join(''); var _routeParams = { id: id, file: file }; var _postBody = {}; var _urlParams = {}; if (typeof property !== 'undefined' && property !== null) { _urlParams['property'] = property; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.instantiate = function (id, options, retry) { if (options === void 0) { options = {}; } if (retry === void 0) { retry = false; } var _method = 'POST'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/instantiate' ].join(''); var _routeParams = { id: id }; var _postBody = options; var _urlParams = {}; return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.getAssetStateTemplatesEventTriggerAssetStateTemplates = function (id, nk, filter, retry) { if (filter === void 0) { filter = {}; } if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/assetStateTemplates/:nk/eventTriggerAssetStateTemplates' ].join(''); var _routeParams = { id: id, nk: nk }; var _postBody = {}; var _urlParams = {}; if (typeof filter !== 'undefined' && filter !== null) { _urlParams['filter'] = filter; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; AssetTemplateApi.getAssetStateTemplatesStateTemplates = function (id, nk, filter, retry) { if (filter === void 0) { filter = {}; } if (retry === void 0) { retry = false; } var _method = 'GET'; var _url = [ XompassClient_1.XompassClient.getPath() + '/' + XompassClient_1.XompassClient.getApiVersion(), '/AssetTemplates/:id/assetStateTemplates/:nk/stateTemplates' ].join(''); var _routeParams = { id: id, nk: nk }; var _postBody = {}; var _urlParams = {}; if (typeof filter !== 'undefined' && filter !== null) { _urlParams['filter'] = filter; } return _super.request.call(this, _method, _url, _routeParams, _urlParams, _postBody, retry); }; /** * The name of the model represented by this $resource, * i.e. `AssetTemplate`. */ AssetTemplateApi.getModelName = function () { return 'AssetTemplate'; }; AssetTemplateApi.model = SDKModels_1.SDKModels.get('AssetTemplate'); return AssetTemplateApi; }(core_1.XompassBaseApi)); exports.AssetTemplateApi = AssetTemplateApi; //# sourceMappingURL=AssetTemplate.js.map