@sitecore/sc-contenthub-webclient-sdk
Version:
Sitecore Content Hub WebClient SDK.
31 lines (30 loc) • 878 B
TypeScript
import { IRelation } from "../relation";
/**
* Base interface for relation that are associated with many entities.
*/
export interface IToManyRelation extends IRelation {
/**
* Indicates whether all the related items are loaded.
*/
isFullyLoaded: boolean;
/**
* Adds an id to the relation's values.
* @param id - The id to add
*/
add(id: number): void;
/**
* Adds multiple ids to the relation's values.
* @param ids - The ids to add
*/
addRange(ids: Array<number>): void;
/**
* Adds an id to the relation's values.
* @param identifier - The identifier to add
*/
addAsync(identifier: string): Promise<void>;
/**
* Adds multiple ids to the relation's values.
* @param identifiers - The identifiers to add
*/
addRangeAsync(identifiers: Array<string>): Promise<void>;
}