@awhere/api
Version:
The awesome aWhere API for JavaScript.
69 lines • 2.57 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var interfaces_1 = require("@awhere/interfaces");
var PrototypeBase_1 = __importDefault(require("../../PrototypeBase"));
var AccessibleGroup = /** @class */ (function (_super) {
__extends(AccessibleGroup, _super);
function AccessibleGroup(props) {
if (props === void 0) { props = {}; }
var _this = _super.call(this, props) || this;
_this._role = interfaces_1.AccessRoleGroup.inherit;
if (props.group !== undefined) {
_this.group = props.group;
}
if (props.role !== undefined) {
_this.role = props.role;
}
return _this;
}
Object.defineProperty(AccessibleGroup.prototype, "role", {
get: function () {
return this._role;
},
set: function (value) {
this._role = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AccessibleGroup.prototype, "group", {
get: function () {
return this._group;
},
set: function (value) {
if (typeof value === 'string') {
this._id = value;
this._group = value;
}
else if (typeof value === 'object') {
if (value._id) {
this._id = value._id;
}
this._group = value;
}
},
enumerable: false,
configurable: true
});
return AccessibleGroup;
}(PrototypeBase_1.default));
exports.default = AccessibleGroup;
//# sourceMappingURL=AccessibleGroup.js.map