UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

115 lines 3.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Agent = void 0; var Agent = /** @class */ (function () { function Agent(data) { Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `Agent`. */ Agent.getModelName = function () { return 'Agent'; }; /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of Agent for dynamic purposes. */ Agent.factory = function (data) { return new Agent(data); }; /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ Agent.getModelDefinition = function () { return { name: 'Agent', plural: 'Agents', path: 'Agents', idName: 'id', properties: { name: { name: 'name', type: 'string' }, description: { name: 'description', type: 'string' }, enabled: { name: 'enabled', type: 'boolean' }, sendInterval: { name: 'sendInterval', type: 'string' }, testMode: { name: 'testMode', type: 'boolean' }, dataMode: { name: 'dataMode', type: 'string' }, responsible: { name: 'responsible', type: 'Array<any>' }, notification: { name: 'notification', type: 'any' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, id: { name: 'id', type: 'any' }, customerId: { name: 'customerId', type: 'any' }, }, relations: { customer: { name: 'customer', type: 'Customer', model: 'Customer', relationType: 'belongsTo', keyFrom: 'customerId', keyTo: 'id' }, trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, } }; }; return Agent; }()); exports.Agent = Agent; //# sourceMappingURL=Agent.js.map