UNPKG

@sitecore/sc-contenthub-webclient-sdk

Version:

Sitecore Content Hub WebClient SDK.

26 lines 941 B
import Guard from "../../guard"; import { EntityIterator } from "./entity-iterator"; export class QueryResultBase { constructor(totalItems, offset) { Guard.notNegative(totalItems); Guard.notNegative(offset); this.totalNumberOfResults = totalItems; this.offset = offset; } } export class EntityQueryResult extends QueryResultBase { constructor(client, query, loadConfiguration, entities, totalItems, offset) { super(totalItems, offset); Guard.notNullOrUndefined(client); Guard.notNullOrUndefined(query); Guard.notNullOrUndefined(entities); this._client = client; this._query = query; this._loadConfiguration = loadConfiguration; this.items = [...entities]; } createIterator() { return new EntityIterator(this._client, this._query, this._loadConfiguration, this); } } //# sourceMappingURL=entity-query-result.js.map