UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

119 lines 3.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApiKey = void 0; var ApiKey = /** @class */ (function () { function ApiKey(data) { this.ttl = 1209600; this.enabled = true; Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `ApiKey`. */ ApiKey.getModelName = function () { return 'ApiKey'; }; /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of ApiKey for dynamic purposes. */ ApiKey.factory = function (data) { return new ApiKey(data); }; /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ ApiKey.getModelDefinition = function () { return { name: 'ApiKey', plural: 'ApiKeys', path: 'ApiKeys', idName: 'id', properties: { name: { name: 'name', type: 'string' }, id: { name: 'id', type: 'string' }, ttl: { name: 'ttl', type: 'number', default: 1209600 }, scopes: { name: 'scopes', type: 'Array<any>' }, enabled: { name: 'enabled', type: 'boolean', default: true }, testMode: { name: 'testMode', type: 'boolean' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, customerId: { name: 'customerId', type: 'any' }, _rateLimit: { name: '_rateLimit', 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' }, rateLimit: { name: 'rateLimit', type: 'RateLimit[]', model: 'RateLimit', relationType: 'embedsOne', keyFrom: '_rateLimit', keyTo: 'id' }, } }; }; return ApiKey; }()); exports.ApiKey = ApiKey; //# sourceMappingURL=ApiKey.js.map