Fix nullability of return types that can be non-null (#15927)

* Fix nullability of Children extension

* Fix nullability of methods throughout the CMS

* Fix return types of some methods that cannot return null

* Revert nullable changes to result of ConvertSourceToIntermediate for property editors (whilst some property editors we know won't return null, it seems more consistent to adhere to the base class and interface nullability definition).

* Updated new webhook events to align with new nullability definitions.

* Reverted content editing service updates to align with base classes.

* Applied collection nullability updates on content repository to interface.

* Reverted value converter updates to match interface.

* Applied further collection updates to interface.

* Aligned media service interface with implementation for nullability.

* Update from code review.

---------

Co-authored-by: Ivo van der Bruggen <ivo@dutchbreeze.com>
Co-authored-by: Ivo van der Bruggen <ivo@vdbruggensoftware.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
This commit is contained in:
Ivo van der Bruggen
2025-07-30 14:19:20 +02:00
committed by GitHub
parent c6bc4ef49a
commit c3e93f143c
154 changed files with 172 additions and 172 deletions

View File

@@ -8,11 +8,11 @@ namespace Umbraco.Extensions;
public static class MethodInfoApiCommonExtensions
{
public static string? GetMapToApiVersionAttributeValue(this MethodInfo methodInfo)
public static string GetMapToApiVersionAttributeValue(this MethodInfo methodInfo)
{
MapToApiVersionAttribute[] mapToApis = methodInfo.GetCustomAttributes(typeof(MapToApiVersionAttribute), inherit: true).Cast<MapToApiVersionAttribute>().ToArray();
return string.Join("|", mapToApis.SelectMany(x=>x.Versions));
return string.Join("|", mapToApis.SelectMany(x => x.Versions));
}
public static string? GetMapToApiAttributeValue(this MethodInfo methodInfo)

View File

@@ -11,6 +11,6 @@ public class ApiContentPathProvider : IApiContentPathProvider
public ApiContentPathProvider(IPublishedUrlProvider publishedUrlProvider)
=> _publishedUrlProvider = publishedUrlProvider;
public virtual string? GetContentPath(IPublishedContent content, string? culture)
public virtual string GetContentPath(IPublishedContent content, string? culture)
=> _publishedUrlProvider.GetUrl(content, UrlMode.Relative, culture);
}

View File

@@ -81,7 +81,7 @@ internal sealed class DefaultCultureDictionary : ICultureDictionary
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public string? this[string key]
public string this[string key]
{
get
{

View File

@@ -181,7 +181,7 @@ public static class UriExtensions
public static Uri WithoutPort(this Uri uri) =>
new Uri(uri.GetComponents(UriComponents.AbsoluteUri & ~UriComponents.Port, UriFormat.UriEscaped));
private static string? GetSafeQuery(this Uri uri)
private static string GetSafeQuery(this Uri uri)
{
if (uri.IsAbsoluteUri)
{

View File

@@ -10,7 +10,7 @@ public static class DictionaryItemExtensions
/// <param name="d"></param>
/// <param name="isoCode"></param>
/// <returns></returns>
public static string? GetTranslatedValue(this IDictionaryItem d, string isoCode)
public static string GetTranslatedValue(this IDictionaryItem d, string isoCode)
{
IDictionaryTranslation? trans = d.Translations.FirstOrDefault(x => x.LanguageIsoCode == isoCode);
return trans == null ? string.Empty : trans.Value;

View File

@@ -25,7 +25,7 @@ public struct ReadOnlyContentBaseAdapter : IReadOnlyContentBase
public int Level => _content.Level;
public string? Path => _content.Path;
public string Path => _content.Path;
public int SortOrder => _content.SortOrder;

View File

@@ -143,7 +143,7 @@ public static class UserExtensions
/// <summary>
/// Calculate start nodes, combining groups' and user's, and excluding what's in the bin
/// </summary>
public static int[]? CalculateAllowedLanguageIds(this IUser user, ILocalizationService localizationService)
public static int[] CalculateAllowedLanguageIds(this IUser user, ILocalizationService localizationService)
{
var hasAccessToAllLanguages = user.Groups.Any(x => x.HasAccessToAllLanguages);

View File

@@ -52,7 +52,7 @@ public interface IContentRepository<in TId, TEntity> : IReadWriteQueryRepository
/// <summary>
/// Gets the recycle bin content.
/// </summary>
IEnumerable<TEntity>? GetRecycleBin();
IEnumerable<TEntity> GetRecycleBin();
/// <summary>
/// Gets the count of content items of a given content type.

View File

@@ -57,6 +57,6 @@ public class TextStringValueConverter : PropertyValueConverterBase, IDeliveryApi
public Type GetDeliveryApiPropertyValueType(IPublishedPropertyType propertyType)
=> GetPropertyValueType(propertyType);
public object ConvertIntermediateToDeliveryApiObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview, bool expanding)
public object? ConvertIntermediateToDeliveryApiObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object? inter, bool preview, bool expanding)
=> ConvertIntermediateToObject(owner, propertyType, referenceCacheLevel, inter, preview);
}

View File

@@ -1,4 +1,4 @@
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Extensions;
namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters;

View File

@@ -15,7 +15,7 @@ public class DatePickerValueConverter : PropertyValueConverterBase
public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
=> PropertyCacheLevel.Element;
public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
public override object? ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
=> ParseDateTimeValue(source);
internal static DateTime ParseDateTimeValue(object? source)

View File

@@ -1,4 +1,4 @@
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters;

View File

@@ -15,7 +15,7 @@ public class DecimalValueConverter : PropertyValueConverterBase
public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
=> PropertyCacheLevel.Element;
public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
public override object? ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
=> ParseDecimalValue(source);
internal static decimal ParseDecimalValue(object? source)

View File

@@ -1,4 +1,4 @@
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters;

View File

@@ -16,7 +16,7 @@ public class FlexibleDropdownPropertyValueConverter : PropertyValueConverterBase
public override bool IsConverter(IPublishedPropertyType propertyType) =>
propertyType.EditorAlias.Equals(Constants.PropertyEditors.Aliases.DropDownListFlexible);
public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
public override object? ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
{
if (source is null)
{

View File

@@ -1,4 +1,4 @@
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Extensions;
namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters;
@@ -15,7 +15,7 @@ public class IntegerValueConverter : PropertyValueConverterBase
public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
=> PropertyCacheLevel.Element;
public override object ConvertSourceToIntermediate(
public override object? ConvertSourceToIntermediate(
IPublishedElement owner,
IPublishedPropertyType propertyType,
object? source,

View File

@@ -1,4 +1,4 @@
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Extensions;
namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters;

View File

@@ -1,4 +1,4 @@
using System.Globalization;
using System.Globalization;
using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters;
@@ -43,7 +43,7 @@ public class LabelValueConverter : PropertyValueConverterBase
public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
=> PropertyCacheLevel.Element;
public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
public override object? ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
{
LabelConfiguration? valueType =
ConfigurationEditor.ConfigurationAs<LabelConfiguration>(propertyType.DataType.ConfigurationObject);

View File

@@ -22,7 +22,7 @@ public class MemberGroupPickerValueConverter : PropertyValueConverterBase, IDeli
public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
=> PropertyCacheLevel.Element;
public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview) => source?.ToString() ?? string.Empty;
public override object? ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview) => source?.ToString() ?? string.Empty;
public PropertyCacheLevel GetDeliveryApiPropertyCacheLevel(IPublishedPropertyType propertyType) => GetPropertyCacheLevel(propertyType);

View File

@@ -1,4 +1,4 @@
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters;
@@ -16,7 +16,7 @@ public class MultipleTextStringValueConverter : PropertyValueConverterBase
public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
=> PropertyCacheLevel.Element;
public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
public override object? ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
{
// data is (both in database and xml):
// <keyFeatureList>

View File

@@ -32,7 +32,7 @@ public class SliderValueConverter : PropertyValueConverterBase
=> PropertyCacheLevel.Element;
/// <inheritdoc />
public override object? ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel cacheLevel, object? source, bool preview)
public override object ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel cacheLevel, object? source, bool preview)
{
bool isRange = IsRange(propertyType);

View File

@@ -235,7 +235,7 @@ public interface IMediaService : IContentServiceBase<IMedia>
/// </summary>
/// <param name="level">The level to retrieve Media from</param>
/// <returns>An Enumerable list of <see cref="IMedia" /> objects</returns>
IEnumerable<IMedia>? GetByLevel(int level);
IEnumerable<IMedia> GetByLevel(int level);
/// <summary>
/// Gets a specific version of an <see cref="IMedia" /> item.

View File

@@ -385,7 +385,7 @@ public interface IMemberService : IMembershipMemberService, IContentServiceBase<
/// <returns>
/// <see cref="IEnumerable{IMember}" />
/// </returns>
IEnumerable<IMember>? GetMembersByPropertyValue(
IEnumerable<IMember> GetMembersByPropertyValue(
string propertyTypeAlias,
string value,
StringPropertyMatchType matchType = StringPropertyMatchType.Exact);
@@ -402,7 +402,7 @@ public interface IMemberService : IMembershipMemberService, IContentServiceBase<
/// <returns>
/// <see cref="IEnumerable{IMember}" />
/// </returns>
IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, int value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact);
IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, int value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact);
/// <summary>
/// Gets a list of Members based on a property search
@@ -412,7 +412,7 @@ public interface IMemberService : IMembershipMemberService, IContentServiceBase<
/// <returns>
/// <see cref="IEnumerable{IMember}" />
/// </returns>
IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, bool value);
IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, bool value);
/// <summary>
/// Gets a list of Members based on a property search
@@ -426,7 +426,7 @@ public interface IMemberService : IMembershipMemberService, IContentServiceBase<
/// <returns>
/// <see cref="IEnumerable{IMember}" />
/// </returns>
IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, DateTime value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact);
IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, DateTime value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact);
/// <summary>
/// Saves only the properties related to login for the member, using an optimized, non-locking update.

View File

@@ -35,7 +35,7 @@ public interface IServerRegistrationService
/// <paramref name="refresh" /> parameter to force a cache refresh and reload active servers
/// from the database.
/// </remarks>
IEnumerable<IServerRegistration>? GetActiveServers(bool refresh = false);
IEnumerable<IServerRegistration> GetActiveServers(bool refresh = false);
/// <summary>
/// Return all servers (active and inactive).

View File

@@ -510,7 +510,7 @@ namespace Umbraco.Cms.Core.Services
/// <param name="level">The level to retrieve Media from</param>
/// <returns>An Enumerable list of <see cref="IMedia"/> objects</returns>
/// <remarks>Contrary to most methods, this method filters out trashed media items.</remarks>
public IEnumerable<IMedia>? GetByLevel(int level)
public IEnumerable<IMedia> GetByLevel(int level)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);
scope.ReadLock(Constants.Locks.MediaTree);

View File

@@ -1,4 +1,4 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Extensions;

View File

@@ -676,7 +676,7 @@ namespace Umbraco.Cms.Core.Services
/// <param name="value"><see cref="string"/> Value to match</param>
/// <param name="matchType">The type of match to make as <see cref="StringPropertyMatchType"/>. Default is <see cref="StringPropertyMatchType.Exact"/></param>
/// <returns><see cref="IEnumerable{IMember}"/></returns>
public IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, string value, StringPropertyMatchType matchType = StringPropertyMatchType.Exact)
public IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, string value, StringPropertyMatchType matchType = StringPropertyMatchType.Exact)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);
scope.ReadLock(Constants.Locks.MemberTree);
@@ -710,7 +710,7 @@ namespace Umbraco.Cms.Core.Services
/// <param name="value"><see cref="int"/> Value to match</param>
/// <param name="matchType">The type of match to make as <see cref="StringPropertyMatchType"/>. Default is <see cref="StringPropertyMatchType.Exact"/></param>
/// <returns><see cref="IEnumerable{IMember}"/></returns>
public IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, int value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact)
public IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, int value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);
scope.ReadLock(Constants.Locks.MemberTree);
@@ -746,7 +746,7 @@ namespace Umbraco.Cms.Core.Services
/// <param name="propertyTypeAlias">Alias of the PropertyType to search for</param>
/// <param name="value"><see cref="bool"/> Value to match</param>
/// <returns><see cref="IEnumerable{IMember}"/></returns>
public IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, bool value)
public IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, bool value)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);
scope.ReadLock(Constants.Locks.MemberTree);
@@ -762,7 +762,7 @@ namespace Umbraco.Cms.Core.Services
/// <param name="value"><see cref="System.DateTime"/> Value to match</param>
/// <param name="matchType">The type of match to make as <see cref="StringPropertyMatchType"/>. Default is <see cref="StringPropertyMatchType.Exact"/></param>
/// <returns><see cref="IEnumerable{IMember}"/></returns>
public IEnumerable<IMember>? GetMembersByPropertyValue(string propertyTypeAlias, DateTime value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact)
public IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, DateTime value, ValuePropertyMatchType matchType = ValuePropertyMatchType.Exact)
{
using ICoreScope scope = ScopeProvider.CreateCoreScope(autoComplete: true);
scope.ReadLock(Constants.Locks.MemberTree);

View File

@@ -138,7 +138,7 @@ public sealed class ServerRegistrationService : RepositoryService, IServerRegist
/// <paramref name="refresh" /> parameter to force a cache refresh and reload active servers
/// from the database.
/// </remarks>
public IEnumerable<IServerRegistration>? GetActiveServers(bool refresh = false) =>
public IEnumerable<IServerRegistration> GetActiveServers(bool refresh = false) =>
GetServers(refresh).Where(x => x.IsActive);
/// <summary>

View File

@@ -24,7 +24,7 @@ public class ContentCopiedWebhookEvent : WebhookEventBase<ContentCopiedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.ContentCopied;
public override object? ConvertNotificationToRequestPayload(ContentCopiedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentCopiedNotification notification)
{
return new
{

View File

@@ -29,7 +29,7 @@ public class ContentDeletedVersionsWebhookEvent : WebhookEventBase<ContentDelete
public override string Alias => Constants.WebhookEvents.Aliases.ContentDeletedVersions;
public override object? ConvertNotificationToRequestPayload(ContentDeletedVersionsNotification notification)
public override object ConvertNotificationToRequestPayload(ContentDeletedVersionsNotification notification)
{
return new
{

View File

@@ -34,6 +34,6 @@ public class ContentEmptiedRecycleBinWebhookEvent : WebhookEventContentBase<Cont
protected override IEnumerable<IContent> GetEntitiesFromNotification(ContentEmptiedRecycleBinNotification notification) =>
notification.DeletedEntities;
protected override object? ConvertEntityToRequestPayload(IContent entity)
protected override object ConvertEntityToRequestPayload(IContent entity)
=> new DefaultPayloadModel { Id = entity.Key };
}

View File

@@ -25,6 +25,6 @@ public class ContentMovedToRecycleBinWebhookEvent : WebhookEventBase<ContentMove
public override string Alias => Constants.WebhookEvents.Aliases.ContentMovedToRecycleBin;
public override object? ConvertNotificationToRequestPayload(ContentMovedToRecycleBinNotification notification)
public override object ConvertNotificationToRequestPayload(ContentMovedToRecycleBinNotification notification)
=> notification.MoveInfoCollection.Select(moveInfo => new DefaultPayloadModel { Id = moveInfo.Entity.Key });
}

View File

@@ -25,6 +25,6 @@ public class ContentMovedWebhookEvent : WebhookEventBase<ContentMovedNotificatio
public override string Alias => Constants.WebhookEvents.Aliases.ContentMoved;
public override object? ConvertNotificationToRequestPayload(ContentMovedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentMovedNotification notification)
=> notification.MoveInfoCollection.Select(moveInfo => new DefaultPayloadModel { Id = moveInfo.Entity.Key });
}

View File

@@ -35,7 +35,7 @@ public class ContentSortedWebhookEvent : WebhookEventBase<ContentSortedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.ContentSorted;
public override object? ConvertNotificationToRequestPayload(ContentSortedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentSortedNotification notification)
=> notification.SortedEntities
.OrderBy(entity => entity.SortOrder)
.Select(entity => new

View File

@@ -20,7 +20,7 @@ public class DocumentTypeChangedWebhookEvent : WebhookEventBase<ContentTypeChang
public override string Alias => Constants.WebhookEvents.Aliases.DocumentTypeChanged;
public override object? ConvertNotificationToRequestPayload(ContentTypeChangedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentTypeChangedNotification notification)
=> notification.Changes.Select(contentTypeChange => new
{
Id = contentTypeChange.Item.Key,

View File

@@ -21,6 +21,6 @@ public class DocumentTypeDeletedWebhookEvent : WebhookEventBase<ContentTypeDelet
public override string Alias => Constants.WebhookEvents.Aliases.DocumentTypeDeleted;
public override object? ConvertNotificationToRequestPayload(ContentTypeDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentTypeDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -20,7 +20,7 @@ public class DocumentTypeMovedWebhookEvent : WebhookEventBase<ContentTypeMovedNo
public override string Alias => Constants.WebhookEvents.Aliases.DocumentTypeMoved;
public override object? ConvertNotificationToRequestPayload(ContentTypeMovedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentTypeMovedNotification notification)
=> notification.MoveInfoCollection.Select(moveEvent => new
{
Id = moveEvent.Entity.Key,

View File

@@ -21,6 +21,6 @@ public class DocumentTypeSavedWebhookEvent : WebhookEventBase<ContentTypeSavedNo
public override string Alias => Constants.WebhookEvents.Aliases.DocumentTypeSaved;
public override object? ConvertNotificationToRequestPayload(ContentTypeSavedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentTypeSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -20,7 +20,7 @@ public class MediaTypeChangedWebhookEvent : WebhookEventBase<MediaTypeChangedNot
public override string Alias => Constants.WebhookEvents.Aliases.MediaTypeChanged;
public override object? ConvertNotificationToRequestPayload(MediaTypeChangedNotification notification)
public override object ConvertNotificationToRequestPayload(MediaTypeChangedNotification notification)
=> notification.Changes.Select(contentTypeChange => new
{
Id = contentTypeChange.Item.Key,

View File

@@ -21,6 +21,6 @@ public class MediaTypeDeletedWebhookEvent : WebhookEventBase<MediaTypeDeletedNot
public override string Alias => Constants.WebhookEvents.Aliases.MediaTypeDeleted;
public override object? ConvertNotificationToRequestPayload(MediaTypeDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(MediaTypeDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -20,7 +20,7 @@ public class MediaTypeMovedWebhookEvent : WebhookEventBase<MediaTypeMovedNotific
public override string Alias => Constants.WebhookEvents.Aliases.MediaTypeMoved;
public override object? ConvertNotificationToRequestPayload(MediaTypeMovedNotification notification)
public override object ConvertNotificationToRequestPayload(MediaTypeMovedNotification notification)
=> notification.MoveInfoCollection.Select(moveEvent => new
{
Id = moveEvent.Entity.Key,

View File

@@ -21,6 +21,6 @@ public class MediaTypeSavedWebhookEvent : WebhookEventBase<MediaTypeSavedNotific
public override string Alias => Constants.WebhookEvents.Aliases.MediaTypeSaved;
public override object? ConvertNotificationToRequestPayload(MediaTypeSavedNotification notification)
public override object ConvertNotificationToRequestPayload(MediaTypeSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -20,7 +20,7 @@ public class MemberTypeChangedWebhookEvent : WebhookEventBase<MemberTypeChangedN
public override string Alias => Constants.WebhookEvents.Aliases.MemberTypeChanged;
public override object? ConvertNotificationToRequestPayload(MemberTypeChangedNotification notification)
public override object ConvertNotificationToRequestPayload(MemberTypeChangedNotification notification)
=> notification.Changes.Select(contentTypeChange => new
{
Id = contentTypeChange.Item.Key,

View File

@@ -21,6 +21,6 @@ public class MemberTypeDeletedWebhookEvent : WebhookEventBase<MemberTypeDeletedN
public override string Alias => Constants.WebhookEvents.Aliases.MemberTypeDeleted;
public override object? ConvertNotificationToRequestPayload(MemberTypeDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(MemberTypeDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -20,7 +20,7 @@ public class MemberTypeMovedWebhookEvent : WebhookEventBase<MemberTypeMovedNotif
public override string Alias => Constants.WebhookEvents.Aliases.MemberTypeMoved;
public override object? ConvertNotificationToRequestPayload(MemberTypeMovedNotification notification)
public override object ConvertNotificationToRequestPayload(MemberTypeMovedNotification notification)
=> notification.MoveInfoCollection.Select(moveEvent => new
{
Id = moveEvent.Entity.Key,

View File

@@ -21,6 +21,6 @@ public class MemberTypeSavedWebhookEvent : WebhookEventBase<MemberTypeSavedNotif
public override string Alias => Constants.WebhookEvents.Aliases.MemberTypeSaved;
public override object? ConvertNotificationToRequestPayload(MemberTypeSavedNotification notification)
public override object ConvertNotificationToRequestPayload(MemberTypeSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class DataTypeDeletedWebhookEvent : WebhookEventBase<DataTypeDeletedNotif
public override string Alias => Constants.WebhookEvents.Aliases.DataTypeDeleted;
public override object? ConvertNotificationToRequestPayload(DataTypeDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(DataTypeDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -20,7 +20,7 @@ public class DataTypeMovedWebhookEvent : WebhookEventBase<DataTypeMovedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.DataTypeMoved;
public override object? ConvertNotificationToRequestPayload(DataTypeMovedNotification notification)
public override object ConvertNotificationToRequestPayload(DataTypeMovedNotification notification)
=> notification.MoveInfoCollection.Select(moveEvent => new
{
Id = moveEvent.Entity.Key,

View File

@@ -21,6 +21,6 @@ public class DataTypeSavedWebhookEvent : WebhookEventBase<DataTypeSavedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.DataTypeSaved;
public override object? ConvertNotificationToRequestPayload(DataTypeSavedNotification notification)
public override object ConvertNotificationToRequestPayload(DataTypeSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class DictionaryItemDeletedWebhookEvent : WebhookEventBase<DictionaryItem
public override string Alias => Constants.WebhookEvents.Aliases.DictionaryItemDeleted;
public override object? ConvertNotificationToRequestPayload(DictionaryItemDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(DictionaryItemDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class DictionaryItemSavedWebhookEvent : WebhookEventBase<DictionaryItemSa
public override string Alias => Constants.WebhookEvents.Aliases.DictionaryItemSaved;
public override object? ConvertNotificationToRequestPayload(DictionaryItemSavedNotification notification)
public override object ConvertNotificationToRequestPayload(DictionaryItemSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class DomainDeletedWebhookEvent : WebhookEventBase<DomainDeletedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.DomainDeleted;
public override object? ConvertNotificationToRequestPayload(DomainDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(DomainDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class DomainSavedWebhookEvent : WebhookEventBase<DomainSavedNotification>
public override string Alias => Constants.WebhookEvents.Aliases.DomainSaved;
public override object? ConvertNotificationToRequestPayload(DomainSavedNotification notification)
public override object ConvertNotificationToRequestPayload(DomainSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class PartialViewDeletedWebhookEvent : WebhookEventBase<PartialViewDelete
public override string Alias => Constants.WebhookEvents.Aliases.PartialViewDeleted;
public override object? ConvertNotificationToRequestPayload(PartialViewDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(PartialViewDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class PartialViewSavedWebhookEvent : WebhookEventBase<PartialViewSavedNot
public override string Alias => Constants.WebhookEvents.Aliases.PartialViewSaved;
public override object? ConvertNotificationToRequestPayload(PartialViewSavedNotification notification)
public override object ConvertNotificationToRequestPayload(PartialViewSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class ScriptDeletedWebhookEvent : WebhookEventBase<ScriptDeletedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.ScriptDeleted;
public override object? ConvertNotificationToRequestPayload(ScriptDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(ScriptDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class ScriptSavedWebhookEvent : WebhookEventBase<ScriptSavedNotification>
public override string Alias => Constants.WebhookEvents.Aliases.ScriptSaved;
public override object? ConvertNotificationToRequestPayload(ScriptSavedNotification notification)
public override object ConvertNotificationToRequestPayload(ScriptSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class StylesheetDeletedWebhookEvent : WebhookEventBase<StylesheetDeletedN
public override string Alias => Constants.WebhookEvents.Aliases.StylesheetDeleted;
public override object? ConvertNotificationToRequestPayload(StylesheetDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(StylesheetDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class StylesheetSavedWebhookEvent : WebhookEventBase<StylesheetSavedNotif
public override string Alias => Constants.WebhookEvents.Aliases.StylesheetSaved;
public override object? ConvertNotificationToRequestPayload(StylesheetSavedNotification notification)
public override object ConvertNotificationToRequestPayload(StylesheetSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class TemplateDeletedWebhookEvent : WebhookEventBase<TemplateDeletedNotif
public override string Alias => Constants.WebhookEvents.Aliases.TemplateDeleted;
public override object? ConvertNotificationToRequestPayload(TemplateDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(TemplateDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,7 +21,7 @@ public class TemplateSavedWebhookEvent : WebhookEventBase<TemplateSavedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.TemplateSaved;
public override object? ConvertNotificationToRequestPayload(TemplateSavedNotification notification)
public override object ConvertNotificationToRequestPayload(TemplateSavedNotification notification)
=> notification.SavedEntities.Select(entity => new
{
Id = entity.Key,

View File

@@ -15,7 +15,7 @@ public class HealthCheckCompletedWebhookEvent : WebhookEventBase<HealthCheckComp
public override string Alias => Constants.WebhookEvents.Aliases.HealthCheckCompleted;
public override object? ConvertNotificationToRequestPayload(HealthCheckCompletedNotification notification) =>
public override object ConvertNotificationToRequestPayload(HealthCheckCompletedNotification notification) =>
new
{
notification.HealthCheckResults.AllChecksSuccessful,

View File

@@ -21,6 +21,6 @@ public class LanguageDeletedWebhookEvent : WebhookEventBase<LanguageDeletedNotif
public override string Alias => Constants.WebhookEvents.Aliases.LanguageDeleted;
public override object? ConvertNotificationToRequestPayload(LanguageDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(LanguageDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,7 +21,7 @@ public class LanguageSavedWebhookEvent : WebhookEventBase<LanguageSavedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.LanguageSaved;
public override object? ConvertNotificationToRequestPayload(LanguageSavedNotification notification)
public override object ConvertNotificationToRequestPayload(LanguageSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -25,7 +25,7 @@ public class AssignedMemberRolesWebhookEvent : WebhookEventBase<AssignedMemberRo
public override string Alias => Constants.WebhookEvents.Aliases.AssignedMemberRoles;
public override object? ConvertNotificationToRequestPayload(AssignedMemberRolesNotification notification)
public override object ConvertNotificationToRequestPayload(AssignedMemberRolesNotification notification)
=> new
{
Ids = notification.MemberIds.Select(id => _idKeyMap.GetKeyForId(id, UmbracoObjectTypes.Member).Result),

View File

@@ -21,6 +21,6 @@ public class ExportedMemberWebhookEvent : WebhookEventBase<ExportedMemberNotific
public override string Alias => Constants.WebhookEvents.Aliases.ExportedMember;
public override object? ConvertNotificationToRequestPayload(ExportedMemberNotification notification)
public override object ConvertNotificationToRequestPayload(ExportedMemberNotification notification)
=> new DefaultPayloadModel { Id = notification.Member.Key };
}

View File

@@ -21,7 +21,7 @@ public class MemberDeletedWebhookEvent : WebhookEventBase<MemberDeletedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.MemberDeleted;
public override object? ConvertNotificationToRequestPayload(MemberDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(MemberDeletedNotification notification)
=> notification.DeletedEntities.Select(entity
=> new DefaultPayloadModel { Id = entity.Key, });
}

View File

@@ -21,6 +21,6 @@ public class MemberGroupDeletedWebhookEvent : WebhookEventBase<MemberGroupDelete
public override string Alias => Constants.WebhookEvents.Aliases.MemberGroupDeleted;
public override object? ConvertNotificationToRequestPayload(MemberGroupDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(MemberGroupDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class MemberGroupSavedWebhookEvent : WebhookEventBase<MemberGroupSavedNot
public override string Alias => Constants.WebhookEvents.Aliases.MemberGroupSaved;
public override object? ConvertNotificationToRequestPayload(MemberGroupSavedNotification notification)
public override object ConvertNotificationToRequestPayload(MemberGroupSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel{ Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class MemberSavedWebhookEvent : WebhookEventBase<MemberSavedNotification>
public override string Alias => Constants.WebhookEvents.Aliases.MemberSaved;
public override object? ConvertNotificationToRequestPayload(MemberSavedNotification notification)
public override object ConvertNotificationToRequestPayload(MemberSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -25,7 +25,7 @@ public class RemovedMemberRolesWebhookEvent : WebhookEventBase<RemovedMemberRole
public override string Alias => Constants.WebhookEvents.Aliases.RemovedMemberRoles;
public override object? ConvertNotificationToRequestPayload(RemovedMemberRolesNotification notification)
public override object ConvertNotificationToRequestPayload(RemovedMemberRolesNotification notification)
=> new
{
Ids = notification.MemberIds.Select(id => _idKeyMap.GetKeyForId(id, UmbracoObjectTypes.Member).Result),

View File

@@ -20,7 +20,7 @@ public class ImportedPackageWebhookEvent : WebhookEventBase<ImportedPackageNotif
public override string Alias => Constants.WebhookEvents.Aliases.PackageImported;
public override object? ConvertNotificationToRequestPayload(ImportedPackageNotification notification)
public override object ConvertNotificationToRequestPayload(ImportedPackageNotification notification)
=> new
{
PackageName = notification.InstallationSummary.PackageName,

View File

@@ -21,6 +21,6 @@ public class PublicAccessEntryDeletedWebhookEvent : WebhookEventBase<PublicAcces
public override string Alias => Constants.WebhookEvents.Aliases.PublicAccessEntryDeleted;
public override object? ConvertNotificationToRequestPayload(PublicAccessEntryDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(PublicAccessEntryDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class PublicAccessEntrySavedWebhookEvent : WebhookEventBase<PublicAccessE
public override string Alias => Constants.WebhookEvents.Aliases.PublicAccessEntrySaved;
public override object? ConvertNotificationToRequestPayload(PublicAccessEntrySavedNotification notification)
public override object ConvertNotificationToRequestPayload(PublicAccessEntrySavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class RelationDeletedWebhookEvent : WebhookEventBase<RelationDeletedNotif
public override string Alias => Constants.WebhookEvents.Aliases.RelationDeleted;
public override object? ConvertNotificationToRequestPayload(RelationDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(RelationDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class RelationSavedWebhookEvent : WebhookEventBase<RelationSavedNotificat
public override string Alias => Constants.WebhookEvents.Aliases.RelationSaved;
public override object? ConvertNotificationToRequestPayload(RelationSavedNotification notification)
public override object ConvertNotificationToRequestPayload(RelationSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -22,6 +22,6 @@ public class RelationTypeDeletedWebhookEvent : WebhookEventBase<RelationTypeDele
public override string Alias => Constants.WebhookEvents.Aliases.RelationTypeDeleted;
public override object? ConvertNotificationToRequestPayload(RelationTypeDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(RelationTypeDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class RelationTypeSavedWebhookEvent : WebhookEventBase<RelationTypeSavedN
public override string Alias => Constants.WebhookEvents.Aliases.RelationTypeSaved;
public override object? ConvertNotificationToRequestPayload(RelationTypeSavedNotification notification)
public override object ConvertNotificationToRequestPayload(RelationTypeSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -25,7 +25,7 @@ public class AssignedUserGroupPermissionsWebhookEvent : WebhookEventBase<Assigne
public override string Alias => Constants.WebhookEvents.Aliases.AssignedUserGroupPermissions;
public override object? ConvertNotificationToRequestPayload(AssignedUserGroupPermissionsNotification notification)
public override object ConvertNotificationToRequestPayload(AssignedUserGroupPermissionsNotification notification)
=> notification.EntityPermissions.Select(permission =>
new {
UserId = _idKeyMap.GetKeyForId(permission.EntityId, UmbracoObjectTypes.Unknown).Result,

View File

@@ -21,6 +21,6 @@ public class UserDeletedWebhookEvent : WebhookEventBase<UserDeletedNotification>
public override string Alias => Constants.WebhookEvents.Aliases.UserDeleted;
public override object? ConvertNotificationToRequestPayload(UserDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(UserDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,7 +21,7 @@ public class UserForgotPasswordRequestedWebhookEvent : WebhookEventBase<UserForg
public override string Alias => Constants.WebhookEvents.Aliases.UserForgotPasswordRequested;
public override object? ConvertNotificationToRequestPayload(UserForgotPasswordRequestedNotification notification)
public override object ConvertNotificationToRequestPayload(UserForgotPasswordRequestedNotification notification)
=> new DefaultPayloadModel
{
Id = notification.AffectedUserId is not null &&

View File

@@ -21,6 +21,6 @@ public class UserGroupDeletedWebhookEvent : WebhookEventBase<UserGroupDeletedNot
public override string Alias => Constants.WebhookEvents.Aliases.UserGroupDeleted;
public override object? ConvertNotificationToRequestPayload(UserGroupDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(UserGroupDeletedNotification notification)
=> notification.DeletedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class UserGroupSavedWebhookEvent : WebhookEventBase<UserGroupSavedNotific
public override string Alias => Constants.WebhookEvents.Aliases.UserGroupSaved;
public override object? ConvertNotificationToRequestPayload(UserGroupSavedNotification notification)
public override object ConvertNotificationToRequestPayload(UserGroupSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,7 +21,7 @@ public class UserLockedWebhookEvent : WebhookEventBase<UserLockedNotification>
public override string Alias => Constants.WebhookEvents.Aliases.UserLocked;
public override object? ConvertNotificationToRequestPayload(UserLockedNotification notification)
public override object ConvertNotificationToRequestPayload(UserLockedNotification notification)
=> new DefaultPayloadModel
{
Id = notification.AffectedUserId is not null &&

View File

@@ -21,7 +21,7 @@ public class UserLoginFailedWebhookEvent : WebhookEventBase<UserLoginFailedNotif
public override string Alias => Constants.WebhookEvents.Aliases.UserLoginFailed;
public override object? ConvertNotificationToRequestPayload(UserLoginFailedNotification notification)
public override object ConvertNotificationToRequestPayload(UserLoginFailedNotification notification)
=> new DefaultPayloadModel
{
Id = notification.AffectedUserId is not null &&

View File

@@ -21,7 +21,7 @@ public class UserLoginRequiresVerificationWebhookEvent : WebhookEventBase<UserLo
public override string Alias => Constants.WebhookEvents.Aliases.UserLoginRequiresVerification;
public override object? ConvertNotificationToRequestPayload(UserLoginRequiresVerificationNotification notification)
public override object ConvertNotificationToRequestPayload(UserLoginRequiresVerificationNotification notification)
=> new DefaultPayloadModel
{
Id = notification.AffectedUserId is not null &&

View File

@@ -21,7 +21,7 @@ public class UserLoginSuccessWebhookEvent : WebhookEventBase<UserLoginSuccessNot
public override string Alias => Constants.WebhookEvents.Aliases.UserLoginSuccess;
public override object? ConvertNotificationToRequestPayload(UserLoginSuccessNotification notification)
public override object ConvertNotificationToRequestPayload(UserLoginSuccessNotification notification)
=> new DefaultPayloadModel
{
Id = notification.AffectedUserId is not null &&

View File

@@ -21,7 +21,7 @@ public class UserLogoutSuccessWebhookEvent : WebhookEventBase<UserLogoutSuccessN
public override string Alias => Constants.WebhookEvents.Aliases.UserLogoutSuccess;
public override object? ConvertNotificationToRequestPayload(UserLogoutSuccessNotification notification)
public override object ConvertNotificationToRequestPayload(UserLogoutSuccessNotification notification)
=> new DefaultPayloadModel
{
Id = notification.AffectedUserId is not null &&

View File

@@ -21,7 +21,7 @@ public class UserPasswordChangedWebhookEvent : WebhookEventBase<UserPasswordChan
public override string Alias => Constants.WebhookEvents.Aliases.UserPasswordChanged;
public override object? ConvertNotificationToRequestPayload(UserPasswordChangedNotification notification)
public override object ConvertNotificationToRequestPayload(UserPasswordChangedNotification notification)
=> new
{
Id = notification.AffectedUserId is not null &&

View File

@@ -20,7 +20,7 @@ public class UserPasswordResetWebhookEvent : WebhookEventBase<UserPasswordResetN
public override string Alias => Constants.WebhookEvents.Aliases.UserPasswordReset;
public override object? ConvertNotificationToRequestPayload(UserPasswordResetNotification notification)
public override object ConvertNotificationToRequestPayload(UserPasswordResetNotification notification)
=> new
{
Id = notification.AffectedUserId is not null &&

View File

@@ -21,6 +21,6 @@ public class UserSavedWebhookEvent : WebhookEventBase<UserSavedNotification>
public override string Alias => Constants.WebhookEvents.Aliases.UserSaved;
public override object? ConvertNotificationToRequestPayload(UserSavedNotification notification)
public override object ConvertNotificationToRequestPayload(UserSavedNotification notification)
=> notification.SavedEntities.Select(entity => new DefaultPayloadModel { Id = entity.Key });
}

View File

@@ -21,6 +21,6 @@ public class UserTwoFactorRequestedWebhookEvent : WebhookEventBase<UserTwoFactor
public override string Alias => Constants.WebhookEvents.Aliases.UserTwoFactorRequested;
public override object? ConvertNotificationToRequestPayload(UserTwoFactorRequestedNotification notification)
public override object ConvertNotificationToRequestPayload(UserTwoFactorRequestedNotification notification)
=> new DefaultPayloadModel { Id = notification.UserKey };
}

View File

@@ -20,7 +20,7 @@ public class UserUnlockedWebhookEvent : WebhookEventBase<UserUnlockedNotificatio
public override string Alias => Constants.WebhookEvents.Aliases.UserUnlocked;
public override object? ConvertNotificationToRequestPayload(UserUnlockedNotification notification)
public override object ConvertNotificationToRequestPayload(UserUnlockedNotification notification)
=> new
{
Id = notification.AffectedUserId is not null &&

View File

@@ -24,7 +24,7 @@ public class LegacyContentCopiedWebhookEvent : WebhookEventBase<ContentCopiedNot
public override string Alias => Constants.WebhookEvents.Aliases.ContentCopied;
public override object? ConvertNotificationToRequestPayload(ContentCopiedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentCopiedNotification notification)
{
return new
{

View File

@@ -24,7 +24,7 @@ public class LegacyContentDeletedVersionsWebhookEvent : WebhookEventBase<Content
public override string Alias => Constants.WebhookEvents.Aliases.ContentDeletedVersions;
public override object? ConvertNotificationToRequestPayload(ContentDeletedVersionsNotification notification)
public override object ConvertNotificationToRequestPayload(ContentDeletedVersionsNotification notification)
{
return new
{

View File

@@ -24,6 +24,6 @@ public class LegacyContentMovedToRecycleBinWebhookEvent : WebhookEventBase<Conte
public override string Alias => Constants.WebhookEvents.Aliases.ContentMovedToRecycleBin;
public override object? ConvertNotificationToRequestPayload(ContentMovedToRecycleBinNotification notification)
public override object ConvertNotificationToRequestPayload(ContentMovedToRecycleBinNotification notification)
=> notification.MoveInfoCollection;
}

View File

@@ -24,6 +24,6 @@ public class LegacyContentMovedWebhookEvent : WebhookEventBase<ContentMovedNotif
public override string Alias => Constants.WebhookEvents.Aliases.ContentMoved;
public override object? ConvertNotificationToRequestPayload(ContentMovedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentMovedNotification notification)
=> notification.MoveInfoCollection;
}

View File

@@ -35,7 +35,7 @@ public class LegacyContentSortedWebhookEvent : WebhookEventBase<ContentSortedNot
public override string Alias => Constants.WebhookEvents.Aliases.ContentSorted;
public override object? ConvertNotificationToRequestPayload(ContentSortedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentSortedNotification notification)
{
var sortedEntities = new List<object?>();
foreach (var entity in notification.SortedEntities)

View File

@@ -20,6 +20,6 @@ public class LegacyDocumentTypeChangedWebhookEvent : WebhookEventBase<ContentTyp
public override string Alias => Constants.WebhookEvents.Aliases.DocumentTypeChanged;
public override object? ConvertNotificationToRequestPayload(ContentTypeChangedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentTypeChangedNotification notification)
=> notification.Changes;
}

View File

@@ -20,6 +20,6 @@ public class LegacyDocumentTypeDeletedWebhookEvent : WebhookEventBase<ContentTyp
public override string Alias => Constants.WebhookEvents.Aliases.DocumentTypeDeleted;
public override object? ConvertNotificationToRequestPayload(ContentTypeDeletedNotification notification)
public override object ConvertNotificationToRequestPayload(ContentTypeDeletedNotification notification)
=> notification.DeletedEntities;
}

Some files were not shown because too many files have changed in this diff Show More