UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

123 lines 3.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeviceEventData = void 0; var DeviceEventData = /** @class */ (function () { function DeviceEventData(data) { this.tags = []; this.level = 'NONE'; Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `DeviceEventData`. */ DeviceEventData.getModelName = function () { return 'DeviceEventData'; }; /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of DeviceEventData for dynamic purposes. */ DeviceEventData.factory = function (data) { return new DeviceEventData(data); }; /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ DeviceEventData.getModelDefinition = function () { return { name: 'DeviceEventData', plural: 'DeviceEventData', path: 'DeviceEventData', idName: 'id', properties: { id: { name: 'id', type: 'string' }, type: { name: 'type', type: 'string' }, hash: { name: 'hash', type: 'string' }, tags: { name: 'tags', type: 'Array<any>', default: [] }, content: { name: 'content', type: 'any' }, meta: { name: 'meta', type: 'any' }, level: { name: 'level', type: 'string', default: 'NONE' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, deviceId: { name: 'deviceId', type: 'string' }, deviceEventId: { name: 'deviceEventId', type: 'string' }, }, relations: { device: { name: 'device', type: 'Device', model: 'Device', relationType: 'belongsTo', keyFrom: 'deviceId', keyTo: 'id' }, event: { name: 'event', type: 'DeviceEvent', model: 'DeviceEvent', relationType: 'belongsTo', keyFrom: 'deviceEventId', keyTo: 'id' }, trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, } }; }; return DeviceEventData; }()); exports.DeviceEventData = DeviceEventData; //# sourceMappingURL=DeviceEventData.js.map