UNPKG

@sitecore/sc-contenthub-webclient-sdk

Version:

Sitecore Content Hub WebClient SDK.

59 lines (58 loc) 1.73 kB
import { Nullable } from "../../base-types"; import { ICondition } from "./condition"; import { RuleType } from "./rule-type"; /** * Describes a rule. */ export interface IRule { /** * Non null collection entity definition names which define the entity definitions to which this policy applies. */ definitionNames: Array<string>; /** * Unique identifier of the rule, usually GUID string. * * @remarks * This identifier is automatically generated by the system. */ identifier: Nullable<string>; /** * Non null collection of conditions which need to be fulfilled uniformly in order to trigger this rule * (i.e. conditions are combined with "AND" logical operator). */ conditions: Array<ICondition>; /** * Non null collection of permissions this rule grands. * * @remarks * The permissions are simple string constants recognized by the system. */ permissions: Array<string>; /** * If set to true, this rule only applies to entities created by the logged on user. */ createdByLoggedOnUser: boolean; /** * The type of the rule. */ type: RuleType; /** * Indicates if this object is owned by the system and cannot be updated by users. */ isSystemOwned: boolean; } /** * {@inheritDoc} */ export declare class Rule implements IRule { private _identifier; definitionNames: Array<string>; get identifier(): Nullable<string>; conditions: Array<ICondition>; permissions: Array<string>; createdByLoggedOnUser: boolean; type: RuleType; isSystemOwned: boolean; constructor(init?: Partial<IRule>); setIdentifier(guid: Nullable<string>): void; }