@sitecore/sc-contenthub-webclient-sdk
Version:
Sitecore Content Hub WebClient SDK.
66 lines • 3.42 kB
JavaScript
import { EntityFactory, OptionListFactory, RelationFactory, } from "../factories";
import Guard from "../guard";
import { LinkHelper } from "../link-helper";
import NullLogger from "../logging/null-logger";
import { EntityDefinitionMapper, EntityMapper, TypedEntityCreator } from "../mappers";
import { AggregateClient } from "./aggregates-client";
import { ApiClient } from "./api-client";
import { AssetsClient } from "./assets-client";
import { CommandsClient } from "./commands-client";
import { CultureClient } from "./culture-client";
import { CultureLoader } from "./culture-loader";
import { EntitiesClient } from "./entities-client";
import { EntityDefinitionsClient } from "./entity-definitions-client";
import { InternalClient } from "./internal-client";
import { NotificationsClient } from "./notifications-client";
import { OptionListClient } from "./option-list-client";
import { PagesClient } from "./pages-client";
import { PermissionsClient } from "./permissions-client";
import { PoliciesClient } from "./policies-client";
import { QueryingClient } from "./querying-client";
import { RawClient } from "./raw-client";
import { SearchClient } from "./search-client";
import { SettingsClient } from "./settings-client";
import { UploadClient } from "./upload-client";
import { UsersClient } from "./users-client";
import { VersionChecker } from "./version-checker";
export class ContentHubClient {
constructor(baseUri, oauthGrant, logger = new NullLogger()) {
this.impersonatedUsername = null;
Guard.notNullOrUndefined(baseUri);
Guard.notNull(oauthGrant);
const baseUrl = typeof baseUri === "string" ? baseUri : baseUri.href();
Guard.stringNotNullOrEmpty(baseUrl);
this.logger = logger;
this.internalClient = new InternalClient(baseUri, oauthGrant);
this.api = new ApiClient(this);
this.aggregates = new AggregateClient(this);
this.assets = new AssetsClient(this);
this.commands = new CommandsClient(this);
this.entities = new EntitiesClient(this);
this.entityDefinitions = new EntityDefinitionsClient(this);
this.notifications = new NotificationsClient(this);
this.notifications = new NotificationsClient(this);
this.optionLists = new OptionListClient(this);
this.pages = new PagesClient(this);
this.policies = new PoliciesClient(this);
this.querying = new QueryingClient(this);
this.raw = new RawClient(this);
this.search = new SearchClient(this);
this.settings = new SettingsClient(this);
this.users = new UsersClient(this);
this.permissions = new PermissionsClient(this);
this.uploads = new UploadClient(this);
const cultureLoader = new CultureLoader(this);
this.cultures = new CultureClient(cultureLoader);
this.relationFactory = new RelationFactory(this);
const typedEntityCreator = new TypedEntityCreator(this);
this.entityFactory = new EntityFactory(this, this.relationFactory, cultureLoader, typedEntityCreator);
this.optionListFactory = new OptionListFactory();
this.entityMapper = new EntityMapper(this);
this.entityDefinitionMapper = new EntityDefinitionMapper(this);
this.linkHelper = new LinkHelper(this);
this.versionChecker = new VersionChecker(this.api);
}
}
//# sourceMappingURL=content-hub-client.js.map