@sitecore/sc-contenthub-webclient-sdk
Version:
Sitecore Content Hub WebClient SDK.
73 lines • 2.92 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { JsonElementType, JsonObject, JsonProperty } from "ta-json";
import Link from "../../link";
import { ConditionResource } from "./condition-resource";
/**
* Rule representation for {@link PolicyResource}
*/
let RuleResource = class RuleResource {
constructor(init) {
/**
* Non null collection of entity definition resource links to which this policy applies.
*/
this.definitions = [];
/**
* Non null collection of conditions which needs to be fulfilled uniformly in order to trigger this rule
* (i.e. conditions are combined with "AND" logical operator).
*/
this.conditions = [];
/**
* Non null collection of permissions this rule grands,
*
* @remarks
* The permissions are simple string constants recognized by the system.
*/
this.permissions = [];
Object.assign(this, init);
}
};
__decorate([
JsonProperty("definitions"),
JsonElementType(Link),
__metadata("design:type", Array)
], RuleResource.prototype, "definitions", void 0);
__decorate([
JsonProperty("identifier"),
__metadata("design:type", String)
], RuleResource.prototype, "identifier", void 0);
__decorate([
JsonProperty("conditions"),
JsonElementType(ConditionResource),
__metadata("design:type", Array)
], RuleResource.prototype, "conditions", void 0);
__decorate([
JsonProperty("permissions"),
JsonElementType(String),
__metadata("design:type", Array)
], RuleResource.prototype, "permissions", void 0);
__decorate([
JsonProperty("createdByLoggedOnUser"),
__metadata("design:type", Boolean)
], RuleResource.prototype, "createdByLoggedOnUser", void 0);
__decorate([
JsonProperty("type"),
__metadata("design:type", String)
], RuleResource.prototype, "type", void 0);
__decorate([
JsonProperty("is_system_owned"),
__metadata("design:type", Boolean)
], RuleResource.prototype, "isSystemOwned", void 0);
RuleResource = __decorate([
JsonObject(),
__metadata("design:paramtypes", [Object])
], RuleResource);
export { RuleResource };
//# sourceMappingURL=rule-resource.js.map