UNPKG

@crnk/angular-ngrx

Version:

Angular helper library for ngrx-json-api and crnk:

53 lines 2.39 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import { BeanPath, BooleanPath, StringPath } from '../expression/'; import { MetaDataObject, QMetaDataObject } from './meta.data.object'; import { MetaResourceBase } from './meta.resource.base'; import { ManyQueryResult, OneQueryResult } from 'ngrx-json-api'; var QMetaResource = /** @class */ (function (_super) { __extends(QMetaResource, _super); function QMetaResource() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.metaId = 'resources.meta.resource'; _this.id = _this.createString('id'); _this.type = _this.createString('type'); _this.attributes = new QMetaResource.QAttributes(_this, 'attributes'); _this.relationships = new QMetaDataObject.QRelationships(_this, 'relationships'); return _this; } return QMetaResource; }(BeanPath)); export { QMetaResource }; (function (QMetaResource) { var QAttributes = /** @class */ (function (_super) { __extends(QAttributes, _super); function QAttributes() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.resourceType = _this.createString('resourceType'); _this.insertable = _this.createBoolean('insertable'); _this.updatable = _this.createBoolean('updatable'); _this.deletable = _this.createBoolean('deletable'); _this.readable = _this.createBoolean('readable'); _this.name = _this.createString('name'); return _this; } return QAttributes; }(BeanPath)); QMetaResource.QAttributes = QAttributes; })(QMetaResource || (QMetaResource = {})); export var createEmptyMetaResource = function (id) { return { id: id, type: 'meta/resource', attributes: {}, }; }; //# sourceMappingURL=meta.resource.js.map