UNPKG

@sitecore/sc-contenthub-webclient-sdk

Version:

Sitecore Content Hub WebClient SDK.

34 lines (33 loc) 1.05 kB
import type { Nullable } from "../../base-types"; import { RelationRole } from "../base/relation-role"; /** * Specifies a relation. */ export interface IRelationSpecification { /** * Name of the relation (case insensitive). */ name: string; /** * If the relation is self-referencing, which role to load. * If it is null, both will be loaded into two separate relation objects. */ role: Nullable<RelationRole>; /** * Creates a deep clone of this instance. */ deepClone(): IRelationSpecification; /** * Checks if the current is the equal to other. * @param other - The instance to compare with */ deepEquals(other: IRelationSpecification): boolean; } export declare class RelationSpecification implements IRelationSpecification { name: string; role: Nullable<RelationRole>; constructor(name: string, role?: Nullable<RelationRole>); deepClone(): IRelationSpecification; deepEquals(other: IRelationSpecification): boolean; private onDeserialized; }