@xompass/sdk-cloud-api
Version:
Xompass Client for cloud-api
191 lines • 5.88 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlertNotification = void 0;
var AlertNotification = /** @class */ (function () {
function AlertNotification(data) {
Object.assign(this, data);
}
/**
* The name of the model represented by this $resource,
* i.e. `AlertNotification`.
*/
AlertNotification.getModelName = function () {
return 'AlertNotification';
};
/**
* @method factory
* @author Jonathan Casarrubias
* @license MIT
* This method creates an instance of AlertNotification for dynamic purposes.
*/
AlertNotification.factory = function (data) {
return new AlertNotification(data);
};
/**
* @method getModelDefinition
* @author Julien Ledun
* @license MIT
* This method returns an object that represents some of the model
* definitions.
*/
AlertNotification.getModelDefinition = function () {
return {
name: 'AlertNotification',
plural: 'AlertNotifications',
path: 'AlertNotifications',
idName: 'id',
properties: {
type: {
name: 'type',
type: 'string'
},
subjectType: {
name: 'subjectType',
type: 'string'
},
name: {
name: 'name',
type: 'string'
},
thresholdType: {
name: 'thresholdType',
type: 'string'
},
from: {
name: 'from',
type: 'Date'
},
to: {
name: 'to',
type: 'Date'
},
opened: {
name: 'opened',
type: 'Date'
},
closed: {
name: 'closed',
type: 'Date'
},
length: {
name: 'length',
type: 'number'
},
summary: {
name: 'summary',
type: 'any'
},
threshold: {
name: 'threshold',
type: 'any'
},
notification: {
name: 'notification',
type: 'any'
},
projectInfo: {
name: 'projectInfo',
type: 'any'
},
assetInfo: {
name: 'assetInfo',
type: 'any'
},
sensorInfo: {
name: 'sensorInfo',
type: 'any'
},
sendAt: {
name: 'sendAt',
type: 'Date'
},
admins: {
name: 'admins',
type: 'Array<any>'
},
managers: {
name: 'managers',
type: 'Array<any>'
},
created: {
name: 'created',
type: 'Date'
},
modified: {
name: 'modified',
type: 'Date'
},
deleted: {
name: 'deleted',
type: 'Date',
default: undefined
},
id: {
name: 'id',
type: 'any'
},
assetId: {
name: 'assetId',
type: 'any'
},
assetStateId: {
name: 'assetStateId',
type: 'any'
},
sensorId: {
name: 'sensorId',
type: 'any'
},
stateId: {
name: 'stateId',
type: 'any'
},
},
relations: {
asset: {
name: 'asset',
type: 'Asset',
model: 'Asset',
relationType: 'belongsTo',
keyFrom: 'assetId',
keyTo: 'id'
},
assetState: {
name: 'assetState',
type: 'AssetState',
model: 'AssetState',
relationType: 'belongsTo',
keyFrom: 'assetStateId',
keyTo: 'id'
},
trackingLogs: {
name: 'trackingLogs',
type: 'Log[]',
model: 'Log',
relationType: 'hasMany',
keyFrom: 'id',
keyTo: 'trackingModelId'
},
sensor: {
name: 'sensor',
type: 'Sensor',
model: 'Sensor',
relationType: 'belongsTo',
keyFrom: 'sensorId',
keyTo: 'id'
},
state: {
name: 'state',
type: 'SensorAssetState',
model: 'SensorAssetState',
relationType: 'belongsTo',
keyFrom: 'stateId',
keyTo: 'id'
},
}
};
};
return AlertNotification;
}());
exports.AlertNotification = AlertNotification;
//# sourceMappingURL=AlertNotification.js.map