UNPKG

@sitecore/sc-contenthub-webclient-sdk

Version:

Sitecore Content Hub WebClient SDK.

36 lines (35 loc) 1.46 kB
import { MapNumberTo, MapStringTo, Nullable, Object_Unknown } from "../../../base-types"; import { IContentHubClient } from "../../../clients/content-hub-client"; import { ChildRelationBase, IChildRelation } from "../relation"; import { RelationRole } from "../relation-role"; import { IToOneRelation } from "./to-one-relation"; export interface IChildToOneParentRelation extends IChildRelation, IToOneRelation { /** * The parent id or null. */ parent: Nullable<number>; /** * Gets the properties for a parent. * * If no properties are found, an empty list is returned. */ getParentProperties(): MapStringTo<Object_Unknown>; } export declare class ChildToOneParentRelation extends ChildRelationBase implements IChildToOneParentRelation { private _parent; readonly role: RelationRole; readonly isMultiValue: boolean; get isDirty(): boolean; get parent(): Nullable<number>; set parent(id: Nullable<number>); constructor(name: string, properties?: Nullable<MapNumberTo<MapStringTo<Object_Unknown>>>, client?: IContentHubClient, inheritsSecurity?: boolean); getIds(): Array<number>; setIds(ids: Array<number>): void; clear(): void; getId(): Nullable<number>; setId(id: Nullable<number>): void; setIdentifierAsync(identifier: Nullable<string>): Promise<void>; startTracking(): void; markClean(): void; getParentProperties(): MapStringTo<Object_Unknown>; }