logo
logo

Web SDK changelog

This document contains all changes to the SDK by version.

[4.0.0]

The following have been added to the SDK in 4.0.0:

  • Permissions client; fetches permissions for a specified entity and optionally specified user.
  • Packages client; contains functionality to manage package export.
  • Upload client; uploads files to a Sitecore Content Hub instance.

The following have been changes have been made to the SDK in 4.0.0:

  • Updated logic for mapping a relation to a relation resource.

[3.4.2]

Fixes a bug related to not using the Setting category name as part of the query filter to identify a setting uniquely.

[3.4.1]

Fixes a bug related to self-referencing relations. When the parent side of a self-referencing relation was modified, but the child side of the relation was not, then the entities linked on the child side of the relation (and vice versa) would get cleared on save.

[3.4.0]

This release brings some significant structural changes to the Web SDK that will improve its release cycle, dependency usage, and compatibility with different Content Hub versions.

Release cycle changes

From 3.4.0 on the Web SDK release cycle is no longer tied to the Content Hub release cycle. This allows us to release more frequently when new features are added or when bugs were fixed.

Dependency changes

A lot of (internal and third party) dependencies of the Web SDK were removed. This prevents unexpected changes to the Web SDK because of changes in one or more changes in its dependencies.

The Web SDK will also be lighter since it now relies on less NuGets. However, it is possible that some integrations were using models that were provided in one of the following NuGets:

  • Stylelabs.M.Base.Web.Api.Models
  • Stylelabs.M.Content.Web.Api.Models
  • Stylelabs.M.Dam.Web.Api.Models
  • Stylelabs.M.Portal.Web.Api.Models

If you need one or more of these NuGets, please reference them manually.

Compatibility changes

Until now, the Content Hub was backward compatible with any version of the Web SDK starting from version 3.0. From now on, the Web SDK will also be compatible with any Content Hub version newer or older than the Web SDK (but again starting from version 3.0). This means that you should always be able to update to the latest version of the Web SDK, regardless of the Content Hub version.

For more information, please see Compatibility.

[3.2.0]

This release focuses on extra HTTP resilience and performance improvements for the Entity Definitions client and the culture client.

Furthermore, the older WebApiClient was incorporated in the Web SDK, and the WebApiClient was removed. Note that this results in some namespace changes.

Added

The Web SDK is now using Polly for resilient HTTP calls. Polly is used to manage timeouts, retries, throttling, and authentication token refreshes.

The DiagnosticsClient was added to get extra information from the Web SDK at runtime for auditing and/or debugging. It can be used to log HTTP requests and responses, caching events, networking issues, and warnings (Article).

Added a flag to optionally disable compatibility checks between the server and the SDK (Article).

The ContentGroup property was added to the IMemberGroup interface.

Added an extension method to get the ExtensionData from the underlying JSON payload of an IEntity.

The AllowUpdates property is now also supported on relation definitions. Previously this was only supported on property definitions. As a result, the AllowUpdates property was moved from IPropertyDefinition to IMemberDefinition, the base interface of both property and relation definitions.

Added cached overloads on the Entity Definitions client:

  • GetCachedAsync
  • GetNameCachedAsync
  • GetNamesCachedAsync
  • GetIdCachedAsync
  • GetManyCachedAsync
  • GetManyCachedAsync
  • GetIdsCachedAsync

Added cached method overloads on the culture client:

  • GetDefaultCultureCachedAsync
  • GetAllCulturesCachedAsync

Removed

The DefinitionsToLinksAsync method on the ILinkHelper has been removed.

Changed

The WebApiClient was incorporated in the Web SDK. This change is mostly internal, but it results in some namespace changes. The most notable namespace changes are:

ClassPrevious namespaceCurrent namespace
HttpContentExtensionsStylelabs.M.Sdk.WebApiClient.UtilitiesStylelabs.M.Sdk.WebClient.Http
HttpResponseMessageExtensionsStylelabs.M.Sdk.WebApiClient.UtilitiesStylelabs.M.Sdk.WebClient.Http
JsonContentStylelabs.M.Sdk.WebApiClient.UtilitiesStylelabs.M.Sdk.WebClient.Http
TemplateExtensionsStylelabs.M.Sdk.WebApiClient.UtilitiesStylelabs.M.Sdk.WebClient.Http
DefaultDelegationHandlerFactoryStylelabs.M.Sdk.WebApiClient.HttpStylelabs.M.Sdk.WebClient.Http
DefaultHttpClientFactoryStylelabs.M.Sdk.WebApiClient.HttpStylelabs.M.Sdk.WebClient.Http
IDelegatingHandlerFactoryStylelabs.M.Sdk.WebApiClient.HttpStylelabs.M.Sdk.WebClient.Http
IHttpClientFactoryStylelabs.M.Sdk.WebApiClient.HttpStylelabs.M.Sdk.WebClient.Http
RequestCreatedEventArgsStylelabs.M.Sdk.WebApiClientStylelabs.M.Sdk.WebClient.Http
RefreshTokenReceivedEventArgsStylelabs.M.Sdk.WebApiClientStylelabs.M.Sdk.WebClient.Http
TokenExpiredExceptionStylelabs.M.Sdk.WebApiClient.ExceptionsStylelabs.M.Sdk.WebClient.Http

[3.1.2]

Added

Added throttling support (backport).

[3.1.0]

This release highlights:

  • The new notifications client. This can be used to send real-time (browser), as well as e-mail notifications to users. (Article)
  • The new Assets client. This client is now mainly for managing the final life cycle status of Assets. (Article)
  • Create, modify and delete support for entity definitions using the entity definitions client. (Article)
  • Strongly typed entities for Asset and Mail Templates. (Article)

Added

Added entity definition create, modify and delete operations on the entity definitions client.(Article)

Added the new notifications client. (Article)

Added the assets client. (Article)

This release features the first strongly-typed entities. For assets, the IAsset is now available. With the notifications client also comes a strongly typed entity: IMailTemplate. These strongly typed entities are still just an IEntity, but the entity members are also provided as C# properties and methods for a better development experience. In the future, more strongly typed entities will be added, and existing ones will be extended. (Article)

New features on the IEntityDefinitionsClient:

  • Now supports custom batch size for iterators as an optional parameter when creating the iterators.
  • Added method to get an entity definition by id.
  • Added method to get many entity definitions by ids at once.
  • Added method to resolve definition ids to definition names.
  • Added method to resolve definition names to definition ids. This one is preferred over Task<IList<long>> GetManyIdsAsync(IEnumerable<string> names);.

Added a builder on IEntityLoadConfiguration. This can be used to easily create or extend load configurations. (Article)

The querying filters were extended, the following new string filters are now available (Article):

  • Contains
  • StartsWith
  • EndsWith

More default values were added to the Defaults.

New features on the IEntityDefinition: added the IsNew property.

New features on the ILinkHelper (Web SDK):

  • Improved existing documentation and added documentation where missing (API reference).
  • Added method to create a link to an entity definition by id.

New features on the IUsersClient:

  • Added method to get user id(s) by username(s).
  • Added method to get username(s) by id(s).
  • Added method to get user(s) by id(s).
  • Added method to get user group id(s) by user group name(s).
  • Added method to get user group name(s) by id(s).
  • Added method to get user group(s) by id(s).

Added a flag to optionally disable compatibility checks between the server and the SDK (backport).

Added an extension method to get the ExtensionData from the underlying JSON payload of an IEntity (backport).

Added the AssociatedLabels property on the IRelationDefinition.

Changed

Changes on the IMemberDefinition: IsSecured property is no longer nullable.

Changes on the IRelationDefinition:

  • ChildIsMandatory property is no longer nullable.
  • ParentIsMandatory property is no longer nullable.
  • AncestorsAreCopied has been removed, and PathHierarchyScore was introduced. This is related to the change in M.

Both the EntityLoadOptions and LoadConfiguration properties on Query are now obsolete. Load configurations are now always passed separately from the Query or automatically resolved by the SDK. The properties are still there for backward-compatibility only. This also means that WithProperties, WithRelations, InCultures, and LoadConfiguration when using LINQ is also obsolete. However, as listed above, the load configurations have a similar builder now.

All load options (PropertyLoadOption, RelationLoadOption, CultureLoadOption) now use arrays instead of IEnumerable to list its custom values.

On IEntity: LoadPropertiesAsync, LoadRelationsAsync, LoadMembersAsync will no longer throw when lazy loading is not possible but will directly return false.

Fixed

Fixed an issue where the back-end would throw an exception when executing a query without any filters. It is now possible to query without a filter. This allows, for example, to get the X newest entities in M.

[3.0.5]

Added

Added throttling support (backport).

[3.0.1]

This patch release fixes some bugs.

Added

WebApiException now includes more information and the HTTP status code in its message.

ValidationException's ToString now includes its validation failures.

Added a flag to optionally disable compatibility checks between the server and the SDK (backport).

Added an extension method to get the ExtensionData from the underlying JSON payload of an IEntity (backport).

Changed

Should no longer throws a Stylelabs.M.Sdk.WebApiClient.Exceptions.WebApiException but Stylelabs.M.Sdk.WebClient.Exceptions.WebApiException on unsuccessful API calls.

RelationMemberCondition was referencing an Entity Definition id instead of an Entity id.

The GetSettingsForCategoryAsync would return an empty list when the category did not exist. This was not a transparent behavior, and it will now throw a NotFoundException.

Some defaults values have been changed:

  • Entities are now created with InheritsSecurity to true by default.
  • Property definitions are now created with AllowUpdates to true by default.
  • Relation definitions are now created with AllowNavigation to true by default.

Fixed

Fixed IMemberDefinition models (implementations) not being public.

Fixed issue on IEntityDefinitionsClient where definitions by range returned a result with offset and total count swapped.

Fixed issue on IDataSourcesClient where the client was throwing the wrong exception when a validation exception occurred when deleting a data source.

Fixed issue on ISettingsClient where GetCategoryIdAsync would return 0 instead of null when the category does not exist.

Fixed an issue with the entity factory when creating entities that are explicitly created without any cultures. Now culture-sensitive properties are not on the entity anymore when created without any cultures.

Fixed a bug on IEntityDefinitionsClient where GetIdAsync would throw an NullReferenceException when the definition didn't exist.

Fixed a bug where NestedProperties on a IRelationDefinition would be null instead of an empty list when there were no nested properties.

Fixed missing renditions.

[3.0.0]

Initial release of the SDK. The SDK works on version 3.0.0 and higher of Content Hub.

Can we improve this article ? Provide feedback