@sitecore/sc-contenthub-webclient-sdk
Version:
Sitecore Content Hub WebClient SDK.
20 lines (19 loc) • 1 kB
TypeScript
import { MapStringTo } from "../base-types";
import { IExtendedContentHubClient } from "../clients/extended-client";
import { IEntity } from "../contracts/base/entity";
import { MinimalSchema } from "../contracts/querying/minimal-schema";
import { EntityResource } from "../models/entity-resource";
export declare class EntityMapper {
private readonly _client;
private readonly _propertyMapper;
private readonly _relationMapper;
private readonly _renditionMapper;
private readonly _relatedPathMapper;
constructor(client: IExtendedContentHubClient);
mapEntityAsync(resource: EntityResource, schema?: MinimalSchema): Promise<IEntity>;
mapEntitiesAsync(collection: Array<EntityResource>, schemas: MapStringTo<MinimalSchema>): Promise<Array<IEntity>>;
toResourceAsync(entity: IEntity): Promise<EntityResource>;
mapDirtiesToResourceAsync(entity: IEntity): Promise<EntityResource>;
private createEntityResourceAsync;
private mapBasePropertiesToSdkEntityAsync;
}