diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Document/DocumentPreviewUrlController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Document/DocumentPreviewUrlController.cs new file mode 100644 index 000000000000..5f90b174c788 --- /dev/null +++ b/src/Umbraco.Cms.Api.Management/Controllers/Document/DocumentPreviewUrlController.cs @@ -0,0 +1,53 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Umbraco.Cms.Api.Common.Builders; +using Umbraco.Cms.Api.Management.Factories; +using Umbraco.Cms.Api.Management.ViewModels.Document; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; + +namespace Umbraco.Cms.Api.Management.Controllers.Document; + +[ApiVersion("1.0")] +public class DocumentPreviewUrlController : DocumentControllerBase +{ + private readonly IContentService _contentService; + private readonly IDocumentUrlFactory _documentUrlFactory; + + public DocumentPreviewUrlController( + IContentService contentService, + IDocumentUrlFactory documentUrlFactory) + { + _contentService = contentService; + _documentUrlFactory = documentUrlFactory; + } + + [MapToApiVersion("1.0")] + [HttpGet("{id:guid}/preview-url")] + [ProducesResponseType(typeof(DocumentUrlInfo), StatusCodes.Status200OK)] + [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)] + [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + public async Task GetPreviewUrl(Guid id, string providerAlias, string? culture, string? segment) + { + IContent? content = _contentService.GetById(id); + if (content is null) + { + return NotFound(new ProblemDetailsBuilder() + .WithTitle("Document not found") + .WithDetail("The requested document did not exist.") + .Build()); + } + + DocumentUrlInfo? previewUrlInfo = await _documentUrlFactory.GetPreviewUrlAsync(content, providerAlias, culture, segment); + if (previewUrlInfo is null) + { + return BadRequest(new ProblemDetailsBuilder() + .WithTitle("No preview URL for document") + .WithDetail("Failed to produce a preview URL for the requested document.") + .Build()); + } + + return Ok(previewUrlInfo); + } +} diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Preview/EnterPreviewController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Preview/EnterPreviewController.cs index 5f8ebea67033..65d600ca5c93 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Preview/EnterPreviewController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Preview/EnterPreviewController.cs @@ -7,6 +7,7 @@ namespace Umbraco.Cms.Api.Management.Controllers.Preview; [ApiVersion("1.0")] +[Obsolete("Do not use this. Preview state is initiated implicitly by the preview URL generation. Scheduled for removal in V18.")] public class EnterPreviewController : PreviewControllerBase { private readonly IPreviewService _previewService; diff --git a/src/Umbraco.Cms.Api.Management/Factories/DocumentUrlFactory.cs b/src/Umbraco.Cms.Api.Management/Factories/DocumentUrlFactory.cs index 9982b653b983..998eb808736b 100644 --- a/src/Umbraco.Cms.Api.Management/Factories/DocumentUrlFactory.cs +++ b/src/Umbraco.Cms.Api.Management/Factories/DocumentUrlFactory.cs @@ -1,24 +1,45 @@ +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Api.Management.Routing; using Umbraco.Cms.Api.Management.ViewModels.Document; using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; namespace Umbraco.Cms.Api.Management.Factories; public class DocumentUrlFactory : IDocumentUrlFactory { private readonly IPublishedUrlInfoProvider _publishedUrlInfoProvider; + private readonly UrlProviderCollection _urlProviders; + private readonly IPreviewService _previewService; + private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor; + private readonly IAbsoluteUrlBuilder _absoluteUrlBuilder; + private readonly ILogger _logger; - - public DocumentUrlFactory(IPublishedUrlInfoProvider publishedUrlInfoProvider) - => _publishedUrlInfoProvider = publishedUrlInfoProvider; + public DocumentUrlFactory( + IPublishedUrlInfoProvider publishedUrlInfoProvider, + UrlProviderCollection urlProviders, + IPreviewService previewService, + IBackOfficeSecurityAccessor backOfficeSecurityAccessor, + IAbsoluteUrlBuilder absoluteUrlBuilder, + ILogger logger) + { + _publishedUrlInfoProvider = publishedUrlInfoProvider; + _urlProviders = urlProviders; + _previewService = previewService; + _backOfficeSecurityAccessor = backOfficeSecurityAccessor; + _absoluteUrlBuilder = absoluteUrlBuilder; + _logger = logger; + } public async Task> CreateUrlsAsync(IContent content) { ISet urlInfos = await _publishedUrlInfoProvider.GetAllAsync(content); - return urlInfos - .Where(urlInfo => urlInfo.IsUrl) - .Select(urlInfo => new DocumentUrlInfo { Culture = urlInfo.Culture, Url = urlInfo.Text }) + .Select(urlInfo => CreateDocumentUrlInfo(urlInfo, false)) .ToArray(); } @@ -34,4 +55,54 @@ public async Task> CreateUrlSetsAsync( return documentUrlInfoResourceSets; } + + public async Task GetPreviewUrlAsync(IContent content, string providerAlias, string? culture, string? segment) + { + IUrlProvider? provider = _urlProviders.FirstOrDefault(provider => provider.Alias.InvariantEquals(providerAlias)); + if (provider is null) + { + _logger.LogError("Could not resolve a URL provider requested for preview - it was not registered in the URL providers collection."); + return null; + } + + UrlInfo? previewUrlInfo = await provider.GetPreviewUrlAsync(content, culture, segment); + if (previewUrlInfo is null) + { + _logger.LogError("The URL provider could not generate a preview URL for content with key: {contentKey}", content.Key); + return null; + } + + // must initiate preview state for internal preview URLs + if (previewUrlInfo.Url is not null && previewUrlInfo.IsExternal is false) + { + IUser? currentUser = _backOfficeSecurityAccessor.BackOfficeSecurity?.CurrentUser; + if (currentUser is null) + { + _logger.LogError("Could not access the current backoffice user while attempting to authenticate for preview."); + return null; + } + + if (await _previewService.TryEnterPreviewAsync(currentUser) is false) + { + _logger.LogError("A server error occured, could not initiate an authenticated preview state for the current user."); + return null; + } + } + + return CreateDocumentUrlInfo(previewUrlInfo, previewUrlInfo.IsExternal is false); + } + + private DocumentUrlInfo CreateDocumentUrlInfo(UrlInfo urlInfo, bool ensureAbsoluteUrl) + { + var url = urlInfo.Url?.ToString(); + return new DocumentUrlInfo + { + Culture = urlInfo.Culture, + Url = ensureAbsoluteUrl && url is not null + ? _absoluteUrlBuilder.ToAbsoluteUrl(url).ToString() + : url, + Message = urlInfo.Message, + Provider = urlInfo.Provider, + }; + } } diff --git a/src/Umbraco.Cms.Api.Management/Factories/IDocumentUrlFactory.cs b/src/Umbraco.Cms.Api.Management/Factories/IDocumentUrlFactory.cs index a64d06970409..c9bb87bffcfd 100644 --- a/src/Umbraco.Cms.Api.Management/Factories/IDocumentUrlFactory.cs +++ b/src/Umbraco.Cms.Api.Management/Factories/IDocumentUrlFactory.cs @@ -8,4 +8,6 @@ public interface IDocumentUrlFactory Task> CreateUrlsAsync(IContent content); Task> CreateUrlSetsAsync(IEnumerable contentItems); + + Task GetPreviewUrlAsync(IContent content, string providerAlias, string? culture, string? segment); } diff --git a/src/Umbraco.Cms.Api.Management/OpenApi.json b/src/Umbraco.Cms.Api.Management/OpenApi.json index 5fe220720ba2..64674eb86f71 100644 --- a/src/Umbraco.Cms.Api.Management/OpenApi.json +++ b/src/Umbraco.Cms.Api.Management/OpenApi.json @@ -8659,6 +8659,101 @@ ] } }, + "/umbraco/management/api/v1/document/{id}/preview-url": { + "get": { + "tags": [ + "Document" + ], + "operationId": "GetDocumentByIdPreviewUrl", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "providerAlias", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "culture", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "segment", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/DocumentUrlInfoModel" + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProblemDetails" + } + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ProblemDetails" + } + ] + } + } + } + }, + "401": { + "description": "The resource is protected and requires an authentication token" + }, + "403": { + "description": "The authenticated user does not have access to this resource" + } + }, + "security": [ + { + "Backoffice-User": [ ] + } + ] + } + }, "/umbraco/management/api/v1/document/{id}/public-access": { "post": { "tags": [ @@ -23869,6 +23964,7 @@ "description": "The resource is protected and requires an authentication token" } }, + "deprecated": true, "security": [ { "Backoffice-User": [ ] @@ -39315,6 +39411,8 @@ "DocumentUrlInfoModel": { "required": [ "culture", + "message", + "provider", "url" ], "type": "object", @@ -39324,6 +39422,14 @@ "nullable": true }, "url": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + }, + "provider": { "type": "string" } }, @@ -41519,7 +41625,8 @@ "nullable": true }, "url": { - "type": "string" + "type": "string", + "nullable": true } }, "additionalProperties": false diff --git a/src/Umbraco.Cms.Api.Management/ViewModels/Content/ContentUrlInfoBase.cs b/src/Umbraco.Cms.Api.Management/ViewModels/Content/ContentUrlInfoBase.cs index 8ef23b0d2f34..233c83e13495 100644 --- a/src/Umbraco.Cms.Api.Management/ViewModels/Content/ContentUrlInfoBase.cs +++ b/src/Umbraco.Cms.Api.Management/ViewModels/Content/ContentUrlInfoBase.cs @@ -4,5 +4,5 @@ public abstract class ContentUrlInfoBase { public required string? Culture { get; init; } - public required string Url { get; init; } + public required string? Url { get; init; } } diff --git a/src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentUrlInfo.cs b/src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentUrlInfo.cs index b672ce1db57b..96b17cf5c766 100644 --- a/src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentUrlInfo.cs +++ b/src/Umbraco.Cms.Api.Management/ViewModels/Document/DocumentUrlInfo.cs @@ -2,6 +2,9 @@ namespace Umbraco.Cms.Api.Management.ViewModels.Document; -public sealed class DocumentUrlInfo : ContentUrlInfoBase +public class DocumentUrlInfo : ContentUrlInfoBase { + public required string? Message { get; init; } + + public required string Provider { get; init; } } diff --git a/src/Umbraco.Core/Constants-UrlProviders.cs b/src/Umbraco.Core/Constants-UrlProviders.cs new file mode 100644 index 000000000000..47524d6d3d6c --- /dev/null +++ b/src/Umbraco.Core/Constants-UrlProviders.cs @@ -0,0 +1,11 @@ +namespace Umbraco.Cms.Core; + +public static partial class Constants +{ + public static class UrlProviders + { + public const string Content = "umbDocumentUrlProvider"; + + public const string Media = "umbMediaUrlProvider"; + } +} diff --git a/src/Umbraco.Core/Events/AddUnroutableContentWarningsWhenPublishingNotificationHandler.cs b/src/Umbraco.Core/Events/AddUnroutableContentWarningsWhenPublishingNotificationHandler.cs index c50e767b7f73..5e6fb71a0228 100644 --- a/src/Umbraco.Core/Events/AddUnroutableContentWarningsWhenPublishingNotificationHandler.cs +++ b/src/Umbraco.Core/Events/AddUnroutableContentWarningsWhenPublishingNotificationHandler.cs @@ -108,7 +108,7 @@ public async Task HandleAsync(ContentPublishedNotification notification, Cancell EventMessages eventMessages = _eventMessagesFactory.Get(); foreach (var culture in successfulCultures) { - if (urls.Where(u => u.Culture == culture || culture == "*").All(u => u.IsUrl is false)) + if (urls.Where(u => u.Culture == culture || culture == "*").All(u => u.Url is null)) { eventMessages.Add(new EventMessage("Content published", "The document does not have a URL, possibly due to a naming collision with another document. More details can be found under Info.", EventMessageType.Warning)); diff --git a/src/Umbraco.Core/Routing/AliasUrlProvider.cs b/src/Umbraco.Core/Routing/AliasUrlProvider.cs index 6166461a746d..eb8aa3d576e8 100644 --- a/src/Umbraco.Core/Routing/AliasUrlProvider.cs +++ b/src/Umbraco.Core/Routing/AliasUrlProvider.cs @@ -1,5 +1,6 @@ using Microsoft.Extensions.Options; using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.PublishedContent; using Umbraco.Cms.Core.Services.Navigation; using Umbraco.Cms.Core.Web; @@ -40,6 +41,9 @@ public AliasUrlProvider( requestConfig.OnChange(x => _requestConfig = x); } + /// + public string Alias => $"{Constants.UrlProviders.Content}ByAlias"; + // note - at the moment we seem to accept pretty much anything as an alias // without any form of validation ... could even prob. kill the XPath ... // ok, this is somewhat experimental and is NOT enabled by default @@ -120,7 +124,7 @@ public IEnumerable GetOtherUrls(int id, Uri current) { var path = "/" + alias; var uri = new Uri(path, UriKind.Relative); - yield return UrlInfo.Url(_uriUtility.UriFromUmbraco(uri, _requestConfig).ToString()); + yield return UrlInfo.FromUri(_uriUtility.UriFromUmbraco(uri, _requestConfig), Alias); } } else @@ -152,9 +156,7 @@ public IEnumerable GetOtherUrls(int id, Uri current) { var path = "/" + alias; var uri = new Uri(CombinePaths(domainUri.Uri.GetLeftPart(UriPartial.Authority), path)); - yield return UrlInfo.Url( - _uriUtility.UriFromUmbraco(uri, _requestConfig).ToString(), - domainUri.Culture); + yield return UrlInfo.FromUri(_uriUtility.UriFromUmbraco(uri, _requestConfig), Alias, domainUri.Culture); } } } @@ -162,6 +164,14 @@ public IEnumerable GetOtherUrls(int id, Uri current) #endregion + #region GetPreviewUrl + + /// + public Task GetPreviewUrlAsync(IContent content, string? culture, string? segment) + => Task.FromResult(null); + + #endregion + #region Utilities private string CombinePaths(string path1, string path2) diff --git a/src/Umbraco.Core/Routing/DefaultMediaUrlProvider.cs b/src/Umbraco.Core/Routing/DefaultMediaUrlProvider.cs index 59113ad5ed65..1f0b59f71a44 100644 --- a/src/Umbraco.Core/Routing/DefaultMediaUrlProvider.cs +++ b/src/Umbraco.Core/Routing/DefaultMediaUrlProvider.cs @@ -39,7 +39,7 @@ public DefaultMediaUrlProvider(MediaUrlGeneratorCollection mediaPathGenerators, if (_mediaPathGenerators.TryGetMediaPath(propType?.EditorAlias, value, out var path)) { Uri url = _urlAssembler.AssembleUrl(path!, current, mode); - return UrlInfo.Url(url.ToString(), culture); + return UrlInfo.FromUri(url, Constants.UrlProviders.Media, culture); } return null; diff --git a/src/Umbraco.Core/Routing/DefaultUrlProvider.cs b/src/Umbraco.Core/Routing/DefaultUrlProvider.cs index 5ffcf6deefc6..03b868cf9af3 100644 --- a/src/Umbraco.Core/Routing/DefaultUrlProvider.cs +++ b/src/Umbraco.Core/Routing/DefaultUrlProvider.cs @@ -4,8 +4,8 @@ using Microsoft.Extensions.Options; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.PublishedContent; -using Umbraco.Cms.Core.PublishedCache; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Services.Navigation; using Umbraco.Cms.Core.Web; @@ -16,6 +16,7 @@ namespace Umbraco.Cms.Core.Routing; /// /// Provides urls. /// +[Obsolete("Use NewDefaultUrlProvider instead. Scheduled for removal in V18.")] public class DefaultUrlProvider : IUrlProvider { private readonly ILocalizationService _localizationService; @@ -76,6 +77,9 @@ public DefaultUrlProvider( { } + /// + public string Alias => $"{Constants.UrlProviders.Content}Legacy"; + #region GetOtherUrls /// @@ -136,7 +140,7 @@ public virtual IEnumerable GetOtherUrls(int id, Uri current) var uri = new Uri(CombinePaths(d.Uri.GetLeftPart(UriPartial.Path), path)); uri = _uriUtility.UriFromUmbraco(uri, _requestSettings); - yield return UrlInfo.Url(uri.ToString(), culture); + yield return UrlInfo.FromUri(uri, Alias, culture); } } @@ -196,8 +200,8 @@ public virtual IEnumerable GetOtherUrls(int id, Uri current) if (domainUri is not null || string.IsNullOrEmpty(culture) || culture.Equals(defaultCulture, StringComparison.InvariantCultureIgnoreCase)) { - var url = AssembleUrl(domainUri, path, current, mode).ToString(); - return UrlInfo.Url(url, culture); + Uri url = AssembleUrl(domainUri, path, current, mode); + return UrlInfo.FromUri(url, Alias, culture); } return null; @@ -205,6 +209,14 @@ public virtual IEnumerable GetOtherUrls(int id, Uri current) #endregion + #region GetPreviewUrl + + /// + public Task GetPreviewUrlAsync(IContent content, string? culture, string? segment) + => Task.FromResult(null); + + #endregion + #region Utilities private Uri AssembleUrl(DomainAndUri? domainUri, string path, Uri current, UrlMode mode) diff --git a/src/Umbraco.Core/Routing/IPublishedUrlProvider.cs b/src/Umbraco.Core/Routing/IPublishedUrlProvider.cs index 598ad1b53591..a9bbe155c370 100644 --- a/src/Umbraco.Core/Routing/IPublishedUrlProvider.cs +++ b/src/Umbraco.Core/Routing/IPublishedUrlProvider.cs @@ -1,3 +1,4 @@ +using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.PublishedContent; namespace Umbraco.Cms.Core.Routing; diff --git a/src/Umbraco.Core/Routing/IUrlProvider.cs b/src/Umbraco.Core/Routing/IUrlProvider.cs index 38f28b37644a..3a83f27670d2 100644 --- a/src/Umbraco.Core/Routing/IUrlProvider.cs +++ b/src/Umbraco.Core/Routing/IUrlProvider.cs @@ -1,3 +1,4 @@ +using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.PublishedContent; namespace Umbraco.Cms.Core.Routing; @@ -38,4 +39,18 @@ public interface IUrlProvider /// /// IEnumerable GetOtherUrls(int id, Uri current); + + /// + /// Gets the preview URL of a content item. + /// + /// The content item. + /// The culture to preview (null means invariant). + /// The segment to preview (null means no specific segment). + /// The preview URLs of the content item. + Task GetPreviewUrlAsync(IContent content, string? culture, string? segment); + + /// + /// Gets the alias for the URL provider. + /// + public string Alias { get; } } diff --git a/src/Umbraco.Core/Routing/NewDefaultUrlProvider.cs b/src/Umbraco.Core/Routing/NewDefaultUrlProvider.cs index 0974ddf8efb5..c4385bb5ada7 100644 --- a/src/Umbraco.Core/Routing/NewDefaultUrlProvider.cs +++ b/src/Umbraco.Core/Routing/NewDefaultUrlProvider.cs @@ -1,9 +1,7 @@ using System.Globalization; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Umbraco.Cms.Core.Configuration.Models; -using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.PublishedContent; using Umbraco.Cms.Core.PublishedCache; @@ -25,7 +23,7 @@ public class NewDefaultUrlProvider : IUrlProvider private readonly IDocumentUrlService _documentUrlService; private readonly IDocumentNavigationQueryService _navigationQueryService; private readonly IPublishedContentStatusFilteringService _publishedContentStatusFilteringService; - private readonly ILogger _logger; + private readonly ILogger _logger; private readonly ISiteDomainMapper _siteDomainMapper; private readonly IUmbracoContextAccessor _umbracoContextAccessor; private readonly UriUtility _uriUtility; @@ -39,7 +37,7 @@ public class NewDefaultUrlProvider : IUrlProvider /// public NewDefaultUrlProvider( IOptionsMonitor requestSettings, - ILogger logger, + ILogger logger, ISiteDomainMapper siteDomainMapper, IUmbracoContextAccessor umbracoContextAccessor, UriUtility uriUtility, @@ -67,6 +65,9 @@ public NewDefaultUrlProvider( requestSettings.OnChange(x => _requestSettings = x); } + /// + public string Alias => Constants.UrlProviders.Content; + /// /// Gets the other URLs of a published content. /// @@ -133,10 +134,23 @@ public virtual IEnumerable GetOtherUrls(int id, Uri current) var uri = new Uri(CombinePaths(d.Uri.GetLeftPart(UriPartial.Path), path)); uri = _uriUtility.UriFromUmbraco(uri, _requestSettings); - yield return UrlInfo.Url(uri.ToString(), culture); + yield return UrlInfo.FromUri(uri, Alias, culture); } } + #region GetPreviewUrl + + /// + public Task GetPreviewUrlAsync(IContent content, string? culture, string? segment) + => Task.FromResult( + UrlInfo.AsUrl( + $"/{Constants.System.UmbracoPathSegment}/preview?id={content.Key}&culture={culture}&segment={segment}", + Alias, + culture, + isExternal: false)); + + #endregion + /// /// Gets the legacy route format by id /// @@ -221,8 +235,8 @@ private string GetLegacyRouteFormatById(Guid key, string? culture) string.IsNullOrEmpty(culture) || culture.Equals(defaultCulture, StringComparison.InvariantCultureIgnoreCase)) { - var url = AssembleUrl(domainUri, path, current, mode).ToString(); - return UrlInfo.Url(url, culture); + Uri url = AssembleUrl(domainUri, path, current, mode); + return UrlInfo.FromUri(url, Alias, culture); } return null; diff --git a/src/Umbraco.Core/Routing/PublishedUrlInfoProvider.cs b/src/Umbraco.Core/Routing/PublishedUrlInfoProvider.cs index c75108232e4a..0e1fbffab69b 100644 --- a/src/Umbraco.Core/Routing/PublishedUrlInfoProvider.cs +++ b/src/Umbraco.Core/Routing/PublishedUrlInfoProvider.cs @@ -10,6 +10,8 @@ namespace Umbraco.Cms.Core.Routing; public class PublishedUrlInfoProvider : IPublishedUrlInfoProvider { + private const string UrlProviderAlias = Constants.UrlProviders.Content; + private readonly IPublishedUrlProvider _publishedUrlProvider; private readonly ILanguageService _languageService; private readonly IPublishedRouter _publishedRouter; @@ -53,7 +55,7 @@ public async Task> GetAllAsync(IContent content) // Handle "could not get URL" if (url is "#" or "#ex") { - urlInfos.Add(UrlInfo.Message(_localizedTextService.Localize("content", "getUrlException"), culture)); + urlInfos.Add(UrlInfo.AsMessage(_localizedTextService.Localize("content", "getUrlException"), UrlProviderAlias, culture)); continue; } @@ -66,7 +68,7 @@ public async Task> GetAllAsync(IContent content) continue; } - urlInfos.Add(UrlInfo.Url(url, culture)); + urlInfos.Add(UrlInfo.AsUrl(url, UrlProviderAlias, culture)); } // If the content is trashed, we can't get the other URLs, as we have no parent structure to navigate through. @@ -77,7 +79,7 @@ public async Task> GetAllAsync(IContent content) // Then get "other" urls - I.E. Not what you'd get with GetUrl(), this includes all the urls registered using domains. // for these 'other' URLs, we don't check whether they are routable, collide, anything - we just report them. - foreach (UrlInfo otherUrl in _publishedUrlProvider.GetOtherUrls(content.Id).OrderBy(x => x.Text).ThenBy(x => x.Culture)) + foreach (UrlInfo otherUrl in _publishedUrlProvider.GetOtherUrls(content.Id).OrderBy(x => x.Message).ThenBy(x => x.Culture)) { urlInfos.Add(otherUrl); } @@ -106,7 +108,7 @@ public async Task> GetAllAsync(IContent content) _logger.LogDebug(logMsg, url, uri, culture); } - var urlInfo = UrlInfo.Message(_localizedTextService.Localize("content", "routeErrorCannotRoute"), culture); + var urlInfo = UrlInfo.AsMessage(_localizedTextService.Localize("content", "routeErrorCannotRoute"), UrlProviderAlias, culture); return Attempt.Succeed(urlInfo); } @@ -119,7 +121,7 @@ public async Task> GetAllAsync(IContent content) { var collidingContent = publishedRequest.PublishedContent?.Key.ToString(); - var urlInfo = UrlInfo.Message(_localizedTextService.Localize("content", "routeError", [collidingContent]), culture); + var urlInfo = UrlInfo.AsMessage(_localizedTextService.Localize("content", "routeError", [collidingContent]), UrlProviderAlias, culture); return Attempt.Succeed(urlInfo); } diff --git a/src/Umbraco.Core/Routing/UrlInfo.cs b/src/Umbraco.Core/Routing/UrlInfo.cs index f5b208fb73e8..e9137a3aaa72 100644 --- a/src/Umbraco.Core/Routing/UrlInfo.cs +++ b/src/Umbraco.Core/Routing/UrlInfo.cs @@ -1,4 +1,5 @@ using System.Runtime.Serialization; +using Umbraco.Extensions; namespace Umbraco.Cms.Core.Routing; @@ -11,18 +12,50 @@ public class UrlInfo : IEquatable /// /// Initializes a new instance of the class. /// - public UrlInfo(string text, bool isUrl, string? culture) + public UrlInfo(Uri url, string provider, string? culture, string? message = null, bool isExternal = false) { - if (string.IsNullOrWhiteSpace(text)) + if (provider.IsNullOrWhiteSpace()) { - throw new ArgumentException("Value cannot be null or whitespace.", nameof(text)); + throw new ArgumentException("Value cannot be null or whitespace.", nameof(provider)); } - IsUrl = isUrl; - Text = text; + Url = url; + Provider = provider; Culture = culture; + Message = message; + IsExternal = isExternal; } + /// + /// Initializes a new instance of the class as a "message only" - that is, not an actual URL. + /// + public UrlInfo(string message, string provider, string? culture = null) + { + if (message.IsNullOrWhiteSpace()) + { + throw new ArgumentException("Value cannot be null or whitespace.", nameof(message)); + } + + if (provider.IsNullOrWhiteSpace()) + { + throw new ArgumentException("Value cannot be null or whitespace.", nameof(provider)); + } + + Url = null; + Provider = provider; + Message = message; + Culture = culture; + } + + public static UrlInfo AsUrl(string url, string provider, string? culture = null, bool isExternal = false) + => new(new Uri(url, UriKind.RelativeOrAbsolute), provider, culture: culture, isExternal: isExternal); + + public static UrlInfo AsMessage(string message, string provider, string? culture = null) + => new(message, provider, culture: culture); + + public static UrlInfo FromUri(Uri uri, string provider, string? culture = null, bool isExternal = false) + => new(uri, provider, culture: culture, isExternal: isExternal); + /// /// Gets the culture. /// @@ -30,34 +63,32 @@ public UrlInfo(string text, bool isUrl, string? culture) public string? Culture { get; } /// - /// Gets a value indicating whether the URL is a true URL. + /// Gets the URL. /// - /// Otherwise, it is a message. - [DataMember(Name = "isUrl")] - public bool IsUrl { get; } + [DataMember(Name = "url")] + public Uri? Url { get; } + + public string Provider { get; } /// - /// Gets the text, which is either the URL, or a message. + /// Gets the message. /// - [DataMember(Name = "text")] - public string Text { get; } - - public static bool operator ==(UrlInfo left, UrlInfo right) => Equals(left, right); + [DataMember(Name = "message")] + public string? Message { get; } /// - /// Creates a instance representing a true URL. + /// Gets whether this is considered an external or a local URL (remote or local host). /// - public static UrlInfo Url(string text, string? culture = null) => new(text, true, culture); + [DataMember(Name = "isExternal")] + public bool IsExternal { get; } + + public static bool operator ==(UrlInfo left, UrlInfo right) => Equals(left, right); /// /// Checks equality /// /// /// - /// - /// Compare both culture and Text as invariant strings since URLs are not case sensitive, nor are culture names within - /// Umbraco - /// public bool Equals(UrlInfo? other) { if (ReferenceEquals(null, other)) @@ -70,15 +101,12 @@ public bool Equals(UrlInfo? other) return true; } - return string.Equals(Culture, other.Culture, StringComparison.InvariantCultureIgnoreCase) && - IsUrl == other.IsUrl && string.Equals(Text, other.Text, StringComparison.InvariantCultureIgnoreCase); + return string.Equals(Culture, other.Culture, StringComparison.InvariantCultureIgnoreCase) + && Url == other.Url + && string.Equals(Message, other.Message, StringComparison.InvariantCultureIgnoreCase) + && IsExternal == other.IsExternal; } - /// - /// Creates a instance representing a message. - /// - public static UrlInfo Message(string text, string? culture = null) => new(text, false, culture); - public override bool Equals(object? obj) { if (ReferenceEquals(null, obj)) @@ -104,14 +132,16 @@ public override int GetHashCode() unchecked { var hashCode = Culture != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(Culture) : 0; - hashCode = (hashCode * 397) ^ IsUrl.GetHashCode(); hashCode = (hashCode * 397) ^ - (Text != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(Text) : 0); + (Url != null ? Url.GetHashCode() : 0); + hashCode = (hashCode * 397) ^ + (Message != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(Message) : 0); + hashCode = (hashCode * 397) ^ IsExternal.GetHashCode(); return hashCode; } } public static bool operator !=(UrlInfo left, UrlInfo right) => !Equals(left, right); - public override string ToString() => Text; + public override string ToString() => Url?.ToString() ?? Message ?? "[empty]"; } diff --git a/src/Umbraco.Core/Routing/UrlProvider.cs b/src/Umbraco.Core/Routing/UrlProvider.cs index 7adcbdc84838..cdc2584609b2 100644 --- a/src/Umbraco.Core/Routing/UrlProvider.cs +++ b/src/Umbraco.Core/Routing/UrlProvider.cs @@ -2,6 +2,7 @@ using Microsoft.Extensions.Options; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.PublishedContent; using Umbraco.Cms.Core.PublishedCache; using Umbraco.Cms.Core.Services.Navigation; @@ -143,7 +144,7 @@ public string GetUrl(IPublishedContent? content, UrlMode mode = UrlMode.Default, UrlInfo? url = _urlProviders.Select(provider => provider.GetUrl(content, mode, culture, current)) .FirstOrDefault(u => u is not null); - return url?.Text ?? "#"; // legacy wants this + return url?.Url?.ToString() ?? "#"; // legacy wants this } public string GetUrlFromRoute(int id, string? route, string? culture) @@ -152,7 +153,7 @@ public string GetUrlFromRoute(int id, string? route, string? culture) NewDefaultUrlProvider? provider = _urlProviders.OfType().FirstOrDefault(); var url = provider == null ? route // what else? - : provider.GetUrlFromRoute(route, id, umbracoContext.CleanedUmbracoUrl, Mode, culture)?.Text; + : provider.GetUrlFromRoute(route, id, umbracoContext.CleanedUmbracoUrl, Mode, culture)?.Url?.ToString(); return url ?? "#"; } @@ -261,7 +262,7 @@ public string GetMediaUrl(IPublishedContent? content, UrlMode mode = UrlMode.Def provider.GetMediaUrl(content, propertyAlias, mode, culture, current)) .FirstOrDefault(u => u is not null); - return url?.Text ?? string.Empty; + return url?.Url?.ToString() ?? string.Empty; } #endregion diff --git a/src/Umbraco.Core/Routing/UrlProviderExtensions.cs b/src/Umbraco.Core/Routing/UrlProviderExtensions.cs index ba90635790cb..f98867ae1c11 100644 --- a/src/Umbraco.Core/Routing/UrlProviderExtensions.cs +++ b/src/Umbraco.Core/Routing/UrlProviderExtensions.cs @@ -1,11 +1,8 @@ -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Umbraco.Cms.Core; -using Umbraco.Cms.Core.DependencyInjection; using Umbraco.Cms.Core.Extensions; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Core.Models.PublishedContent; -using Umbraco.Cms.Core.PublishedCache; using Umbraco.Cms.Core.Routing; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Services.Navigation; @@ -15,6 +12,8 @@ namespace Umbraco.Extensions; public static class UrlProviderExtensions { + private const string UrlProviderAlias = Constants.UrlProviders.Content; + /// /// Gets the URLs of the content item. /// @@ -51,7 +50,7 @@ public static async Task> GetContentUrlsAsync( if (content.Published == false) { - result.Add(UrlInfo.Message(textService.Localize("content", "itemNotPublished"))); + result.Add(UrlInfo.AsMessage(textService.Localize("content", "itemNotPublished"), UrlProviderAlias)); return result; } @@ -77,14 +76,14 @@ public static async Task> GetContentUrlsAsync( } // return the real URLs first, then the messages - foreach (IGrouping urlGroup in urls.GroupBy(x => x.IsUrl).OrderByDescending(x => x.Key)) + foreach (IGrouping urlGroup in urls.GroupBy(x => x.Url is not null).OrderByDescending(x => x.Key)) { // in some cases there will be the same URL for multiple cultures: // * The entire branch is invariant // * If there are less domain/cultures assigned to the branch than the number of cultures/languages installed if (urlGroup.Key) { - result.AddRange(urlGroup.DistinctBy(x => x.Text, StringComparer.OrdinalIgnoreCase).OrderBy(x => x.Text) + result.AddRange(urlGroup.DistinctBy(x => x.Url?.ToString(), StringComparer.OrdinalIgnoreCase).OrderBy(x => x.Url?.ToString()) .ThenBy(x => x.Culture)); } else @@ -95,7 +94,7 @@ public static async Task> GetContentUrlsAsync( // get the 'other' URLs - ie not what you'd get with GetUrl() but URLs that would route to the document, nevertheless. // for these 'other' URLs, we don't check whether they are routable, collide, anything - we just report them. - foreach (UrlInfo otherUrl in publishedUrlProvider.GetOtherUrls(content.Id).OrderBy(x => x.Text) + foreach (UrlInfo otherUrl in publishedUrlProvider.GetOtherUrls(content.Id).OrderBy(x => x.Message) .ThenBy(x => x.Culture)) { // avoid duplicates @@ -156,7 +155,7 @@ private static async Task> GetContentUrlsByCultureAsync( // deal with exceptions case "#ex": - result.Add(UrlInfo.Message(textService.Localize("content", "getUrlException"), culture)); + result.Add(UrlInfo.AsMessage(textService.Localize("content", "getUrlException"), UrlProviderAlias, culture)); break; // got a URL, deal with collisions, add URL @@ -169,7 +168,7 @@ private static async Task> GetContentUrlsByCultureAsync( } else { - result.Add(UrlInfo.Url(url, culture)); + result.Add(UrlInfo.AsUrl(url, UrlProviderAlias, culture)); } break; @@ -194,18 +193,19 @@ private static UrlInfo HandleCouldNotGetUrl(IContent content, string culture, IC if (parent == null) { // oops, internal error - return UrlInfo.Message(textService.Localize("content", "parentNotPublishedAnomaly"), culture); + return UrlInfo.AsMessage(textService.Localize("content", "parentNotPublishedAnomaly"), UrlProviderAlias, culture); } if (!parent.Published) { // totally not published - return UrlInfo.Message(textService.Localize("content", "parentNotPublished", new[] { parent.Name }), culture); + return UrlInfo.AsMessage(textService.Localize("content", "parentNotPublished", new[] { parent.Name }), UrlProviderAlias, culture); } // culture not published - return UrlInfo.Message( + return UrlInfo.AsMessage( textService.Localize("content", "parentCultureNotPublished", new[] { parent.Name }), + UrlProviderAlias, culture); } @@ -243,7 +243,7 @@ private static UrlInfo HandleCouldNotGetUrl(IContent content, string culture, IC logger.LogDebug(logMsg, url, uri, culture); } - var urlInfo = UrlInfo.Message(textService.Localize("content", "routeErrorCannotRoute"), culture); + var urlInfo = UrlInfo.AsMessage(textService.Localize("content", "routeErrorCannotRoute"), UrlProviderAlias, culture); return Attempt.Succeed(urlInfo); } @@ -265,7 +265,7 @@ private static UrlInfo HandleCouldNotGetUrl(IContent content, string culture, IC l.Reverse(); var s = "/" + string.Join("/", l) + " (id=" + pcr.PublishedContent?.Id + ")"; - var urlInfo = UrlInfo.Message(textService.Localize("content", "routeError", new[] { s }), culture); + var urlInfo = UrlInfo.AsMessage(textService.Localize("content", "routeError", new[] { s }), UrlProviderAlias, culture); return Attempt.Succeed(urlInfo); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts index 88b09196ce8a..7a718c555cd6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts @@ -2,7 +2,7 @@ import { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client'; import { client } from './client.gen'; -import type { DeleteDataTypeByIdData, DeleteDataTypeByIdErrors, DeleteDataTypeByIdResponses, DeleteDataTypeFolderByIdData, DeleteDataTypeFolderByIdErrors, DeleteDataTypeFolderByIdResponses, DeleteDictionaryByIdData, DeleteDictionaryByIdErrors, DeleteDictionaryByIdResponses, DeleteDocumentBlueprintByIdData, DeleteDocumentBlueprintByIdErrors, DeleteDocumentBlueprintByIdResponses, DeleteDocumentBlueprintFolderByIdData, DeleteDocumentBlueprintFolderByIdErrors, DeleteDocumentBlueprintFolderByIdResponses, DeleteDocumentByIdData, DeleteDocumentByIdErrors, DeleteDocumentByIdPublicAccessData, DeleteDocumentByIdPublicAccessErrors, DeleteDocumentByIdPublicAccessResponses, DeleteDocumentByIdResponses, DeleteDocumentTypeByIdData, DeleteDocumentTypeByIdErrors, DeleteDocumentTypeByIdResponses, DeleteDocumentTypeFolderByIdData, DeleteDocumentTypeFolderByIdErrors, DeleteDocumentTypeFolderByIdResponses, DeleteLanguageByIsoCodeData, DeleteLanguageByIsoCodeErrors, DeleteLanguageByIsoCodeResponses, DeleteLogViewerSavedSearchByNameData, DeleteLogViewerSavedSearchByNameErrors, DeleteLogViewerSavedSearchByNameResponses, DeleteMediaByIdData, DeleteMediaByIdErrors, DeleteMediaByIdResponses, DeleteMediaTypeByIdData, DeleteMediaTypeByIdErrors, DeleteMediaTypeByIdResponses, DeleteMediaTypeFolderByIdData, DeleteMediaTypeFolderByIdErrors, DeleteMediaTypeFolderByIdResponses, DeleteMemberByIdData, DeleteMemberByIdErrors, DeleteMemberByIdResponses, DeleteMemberGroupByIdData, DeleteMemberGroupByIdErrors, DeleteMemberGroupByIdResponses, DeleteMemberTypeByIdData, DeleteMemberTypeByIdErrors, DeleteMemberTypeByIdResponses, DeletePackageCreatedByIdData, DeletePackageCreatedByIdErrors, DeletePackageCreatedByIdResponses, DeletePartialViewByPathData, DeletePartialViewByPathErrors, DeletePartialViewByPathResponses, DeletePartialViewFolderByPathData, DeletePartialViewFolderByPathErrors, DeletePartialViewFolderByPathResponses, DeletePreviewData, DeletePreviewResponses, DeleteRecycleBinDocumentByIdData, DeleteRecycleBinDocumentByIdErrors, DeleteRecycleBinDocumentByIdResponses, DeleteRecycleBinDocumentData, DeleteRecycleBinDocumentErrors, DeleteRecycleBinDocumentResponses, DeleteRecycleBinMediaByIdData, DeleteRecycleBinMediaByIdErrors, DeleteRecycleBinMediaByIdResponses, DeleteRecycleBinMediaData, DeleteRecycleBinMediaErrors, DeleteRecycleBinMediaResponses, DeleteRedirectManagementByIdData, DeleteRedirectManagementByIdErrors, DeleteRedirectManagementByIdResponses, DeleteScriptByPathData, DeleteScriptByPathErrors, DeleteScriptByPathResponses, DeleteScriptFolderByPathData, DeleteScriptFolderByPathErrors, DeleteScriptFolderByPathResponses, DeleteStylesheetByPathData, DeleteStylesheetByPathErrors, DeleteStylesheetByPathResponses, DeleteStylesheetFolderByPathData, DeleteStylesheetFolderByPathErrors, DeleteStylesheetFolderByPathResponses, DeleteTemplateByIdData, DeleteTemplateByIdErrors, DeleteTemplateByIdResponses, DeleteTemporaryFileByIdData, DeleteTemporaryFileByIdErrors, DeleteTemporaryFileByIdResponses, DeleteUserAvatarByIdData, DeleteUserAvatarByIdErrors, DeleteUserAvatarByIdResponses, DeleteUserById2FaByProviderNameData, DeleteUserById2FaByProviderNameErrors, DeleteUserById2FaByProviderNameResponses, DeleteUserByIdClientCredentialsByClientIdData, DeleteUserByIdClientCredentialsByClientIdErrors, DeleteUserByIdClientCredentialsByClientIdResponses, DeleteUserByIdData, DeleteUserByIdErrors, DeleteUserByIdResponses, DeleteUserCurrent2FaByProviderNameData, DeleteUserCurrent2FaByProviderNameErrors, DeleteUserCurrent2FaByProviderNameResponses, DeleteUserData, DeleteUserDataByIdData, DeleteUserDataByIdErrors, DeleteUserDataByIdResponses, DeleteUserErrors, DeleteUserGroupByIdData, DeleteUserGroupByIdErrors, DeleteUserGroupByIdResponses, DeleteUserGroupByIdUsersData, DeleteUserGroupByIdUsersErrors, DeleteUserGroupByIdUsersResponses, DeleteUserGroupData, DeleteUserGroupErrors, DeleteUserGroupResponses, DeleteUserResponses, DeleteWebhookByIdData, DeleteWebhookByIdErrors, DeleteWebhookByIdResponses, GetCollectionDocumentByIdData, GetCollectionDocumentByIdErrors, GetCollectionDocumentByIdResponses, GetCollectionMediaData, GetCollectionMediaErrors, GetCollectionMediaResponses, GetCultureData, GetCultureErrors, GetCultureResponses, GetDataTypeByIdData, GetDataTypeByIdErrors, GetDataTypeByIdIsUsedData, GetDataTypeByIdIsUsedErrors, GetDataTypeByIdIsUsedResponses, GetDataTypeByIdReferencedByData, GetDataTypeByIdReferencedByErrors, GetDataTypeByIdReferencedByResponses, GetDataTypeByIdResponses, GetDataTypeConfigurationData, GetDataTypeConfigurationErrors, GetDataTypeConfigurationResponses, GetDataTypeFolderByIdData, GetDataTypeFolderByIdErrors, GetDataTypeFolderByIdResponses, GetDictionaryByIdData, GetDictionaryByIdErrors, GetDictionaryByIdExportData, GetDictionaryByIdExportErrors, GetDictionaryByIdExportResponses, GetDictionaryByIdResponses, GetDictionaryData, GetDictionaryErrors, GetDictionaryResponses, GetDocumentAreReferencedData, GetDocumentAreReferencedErrors, GetDocumentAreReferencedResponses, GetDocumentBlueprintByIdData, GetDocumentBlueprintByIdErrors, GetDocumentBlueprintByIdResponses, GetDocumentBlueprintByIdScaffoldData, GetDocumentBlueprintByIdScaffoldErrors, GetDocumentBlueprintByIdScaffoldResponses, GetDocumentBlueprintFolderByIdData, GetDocumentBlueprintFolderByIdErrors, GetDocumentBlueprintFolderByIdResponses, GetDocumentByIdAuditLogData, GetDocumentByIdAuditLogErrors, GetDocumentByIdAuditLogResponses, GetDocumentByIdAvailableSegmentOptionsData, GetDocumentByIdAvailableSegmentOptionsErrors, GetDocumentByIdAvailableSegmentOptionsResponses, GetDocumentByIdData, GetDocumentByIdDomainsData, GetDocumentByIdDomainsErrors, GetDocumentByIdDomainsResponses, GetDocumentByIdErrors, GetDocumentByIdNotificationsData, GetDocumentByIdNotificationsErrors, GetDocumentByIdNotificationsResponses, GetDocumentByIdPublicAccessData, GetDocumentByIdPublicAccessErrors, GetDocumentByIdPublicAccessResponses, GetDocumentByIdPublishedData, GetDocumentByIdPublishedErrors, GetDocumentByIdPublishedResponses, GetDocumentByIdPublishWithDescendantsResultByTaskIdData, GetDocumentByIdPublishWithDescendantsResultByTaskIdErrors, GetDocumentByIdPublishWithDescendantsResultByTaskIdResponses, GetDocumentByIdReferencedByData, GetDocumentByIdReferencedByErrors, GetDocumentByIdReferencedByResponses, GetDocumentByIdReferencedDescendantsData, GetDocumentByIdReferencedDescendantsErrors, GetDocumentByIdReferencedDescendantsResponses, GetDocumentByIdResponses, GetDocumentConfigurationData, GetDocumentConfigurationErrors, GetDocumentConfigurationResponses, GetDocumentTypeAllowedAtRootData, GetDocumentTypeAllowedAtRootErrors, GetDocumentTypeAllowedAtRootResponses, GetDocumentTypeByIdAllowedChildrenData, GetDocumentTypeByIdAllowedChildrenErrors, GetDocumentTypeByIdAllowedChildrenResponses, GetDocumentTypeByIdBlueprintData, GetDocumentTypeByIdBlueprintErrors, GetDocumentTypeByIdBlueprintResponses, GetDocumentTypeByIdCompositionReferencesData, GetDocumentTypeByIdCompositionReferencesErrors, GetDocumentTypeByIdCompositionReferencesResponses, GetDocumentTypeByIdData, GetDocumentTypeByIdErrors, GetDocumentTypeByIdExportData, GetDocumentTypeByIdExportErrors, GetDocumentTypeByIdExportResponses, GetDocumentTypeByIdResponses, GetDocumentTypeConfigurationData, GetDocumentTypeConfigurationErrors, GetDocumentTypeConfigurationResponses, GetDocumentTypeFolderByIdData, GetDocumentTypeFolderByIdErrors, GetDocumentTypeFolderByIdResponses, GetDocumentUrlsData, GetDocumentUrlsErrors, GetDocumentUrlsResponses, GetDocumentVersionByIdData, GetDocumentVersionByIdErrors, GetDocumentVersionByIdResponses, GetDocumentVersionData, GetDocumentVersionErrors, GetDocumentVersionResponses, GetDynamicRootStepsData, GetDynamicRootStepsErrors, GetDynamicRootStepsResponses, GetFilterDataTypeData, GetFilterDataTypeErrors, GetFilterDataTypeResponses, GetFilterMemberData, GetFilterMemberErrors, GetFilterMemberResponses, GetFilterUserData, GetFilterUserErrors, GetFilterUserGroupData, GetFilterUserGroupErrors, GetFilterUserGroupResponses, GetFilterUserResponses, GetHealthCheckGroupByNameData, GetHealthCheckGroupByNameErrors, GetHealthCheckGroupByNameResponses, GetHealthCheckGroupData, GetHealthCheckGroupErrors, GetHealthCheckGroupResponses, GetHelpData, GetHelpErrors, GetHelpResponses, GetImagingResizeUrlsData, GetImagingResizeUrlsErrors, GetImagingResizeUrlsResponses, GetImportAnalyzeData, GetImportAnalyzeErrors, GetImportAnalyzeResponses, GetIndexerByIndexNameData, GetIndexerByIndexNameErrors, GetIndexerByIndexNameResponses, GetIndexerData, GetIndexerErrors, GetIndexerResponses, GetInstallSettingsData, GetInstallSettingsErrors, GetInstallSettingsResponses, GetItemDataTypeData, GetItemDataTypeErrors, GetItemDataTypeResponses, GetItemDataTypeSearchData, GetItemDataTypeSearchErrors, GetItemDataTypeSearchResponses, GetItemDictionaryData, GetItemDictionaryErrors, GetItemDictionaryResponses, GetItemDocumentBlueprintData, GetItemDocumentBlueprintErrors, GetItemDocumentBlueprintResponses, GetItemDocumentData, GetItemDocumentErrors, GetItemDocumentResponses, GetItemDocumentSearchData, GetItemDocumentSearchErrors, GetItemDocumentSearchResponses, GetItemDocumentTypeData, GetItemDocumentTypeErrors, GetItemDocumentTypeResponses, GetItemDocumentTypeSearchData, GetItemDocumentTypeSearchErrors, GetItemDocumentTypeSearchResponses, GetItemLanguageData, GetItemLanguageDefaultData, GetItemLanguageDefaultErrors, GetItemLanguageDefaultResponses, GetItemLanguageErrors, GetItemLanguageResponses, GetItemMediaData, GetItemMediaErrors, GetItemMediaResponses, GetItemMediaSearchData, GetItemMediaSearchErrors, GetItemMediaSearchResponses, GetItemMediaTypeAllowedData, GetItemMediaTypeAllowedErrors, GetItemMediaTypeAllowedResponses, GetItemMediaTypeData, GetItemMediaTypeErrors, GetItemMediaTypeFoldersData, GetItemMediaTypeFoldersErrors, GetItemMediaTypeFoldersResponses, GetItemMediaTypeResponses, GetItemMediaTypeSearchData, GetItemMediaTypeSearchErrors, GetItemMediaTypeSearchResponses, GetItemMemberData, GetItemMemberErrors, GetItemMemberGroupData, GetItemMemberGroupErrors, GetItemMemberGroupResponses, GetItemMemberResponses, GetItemMemberSearchData, GetItemMemberSearchErrors, GetItemMemberSearchResponses, GetItemMemberTypeData, GetItemMemberTypeErrors, GetItemMemberTypeResponses, GetItemMemberTypeSearchData, GetItemMemberTypeSearchErrors, GetItemMemberTypeSearchResponses, GetItemPartialViewData, GetItemPartialViewErrors, GetItemPartialViewResponses, GetItemRelationTypeData, GetItemRelationTypeErrors, GetItemRelationTypeResponses, GetItemScriptData, GetItemScriptErrors, GetItemScriptResponses, GetItemStaticFileData, GetItemStaticFileErrors, GetItemStaticFileResponses, GetItemStylesheetData, GetItemStylesheetErrors, GetItemStylesheetResponses, GetItemTemplateData, GetItemTemplateErrors, GetItemTemplateResponses, GetItemTemplateSearchData, GetItemTemplateSearchErrors, GetItemTemplateSearchResponses, GetItemUserData, GetItemUserErrors, GetItemUserGroupData, GetItemUserGroupErrors, GetItemUserGroupResponses, GetItemUserResponses, GetItemWebhookData, GetItemWebhookErrors, GetItemWebhookResponses, GetLanguageByIsoCodeData, GetLanguageByIsoCodeErrors, GetLanguageByIsoCodeResponses, GetLanguageData, GetLanguageErrors, GetLanguageResponses, GetLogViewerLevelCountData, GetLogViewerLevelCountErrors, GetLogViewerLevelCountResponses, GetLogViewerLevelData, GetLogViewerLevelErrors, GetLogViewerLevelResponses, GetLogViewerLogData, GetLogViewerLogErrors, GetLogViewerLogResponses, GetLogViewerMessageTemplateData, GetLogViewerMessageTemplateErrors, GetLogViewerMessageTemplateResponses, GetLogViewerSavedSearchByNameData, GetLogViewerSavedSearchByNameErrors, GetLogViewerSavedSearchByNameResponses, GetLogViewerSavedSearchData, GetLogViewerSavedSearchErrors, GetLogViewerSavedSearchResponses, GetLogViewerValidateLogsSizeData, GetLogViewerValidateLogsSizeErrors, GetLogViewerValidateLogsSizeResponses, GetManifestManifestData, GetManifestManifestErrors, GetManifestManifestPrivateData, GetManifestManifestPrivateErrors, GetManifestManifestPrivateResponses, GetManifestManifestPublicData, GetManifestManifestPublicResponses, GetManifestManifestResponses, GetMediaAreReferencedData, GetMediaAreReferencedErrors, GetMediaAreReferencedResponses, GetMediaByIdAuditLogData, GetMediaByIdAuditLogErrors, GetMediaByIdAuditLogResponses, GetMediaByIdData, GetMediaByIdErrors, GetMediaByIdReferencedByData, GetMediaByIdReferencedByErrors, GetMediaByIdReferencedByResponses, GetMediaByIdReferencedDescendantsData, GetMediaByIdReferencedDescendantsErrors, GetMediaByIdReferencedDescendantsResponses, GetMediaByIdResponses, GetMediaConfigurationData, GetMediaConfigurationErrors, GetMediaConfigurationResponses, GetMediaTypeAllowedAtRootData, GetMediaTypeAllowedAtRootErrors, GetMediaTypeAllowedAtRootResponses, GetMediaTypeByIdAllowedChildrenData, GetMediaTypeByIdAllowedChildrenErrors, GetMediaTypeByIdAllowedChildrenResponses, GetMediaTypeByIdCompositionReferencesData, GetMediaTypeByIdCompositionReferencesErrors, GetMediaTypeByIdCompositionReferencesResponses, GetMediaTypeByIdData, GetMediaTypeByIdErrors, GetMediaTypeByIdExportData, GetMediaTypeByIdExportErrors, GetMediaTypeByIdExportResponses, GetMediaTypeByIdResponses, GetMediaTypeConfigurationData, GetMediaTypeConfigurationErrors, GetMediaTypeConfigurationResponses, GetMediaTypeFolderByIdData, GetMediaTypeFolderByIdErrors, GetMediaTypeFolderByIdResponses, GetMediaUrlsData, GetMediaUrlsErrors, GetMediaUrlsResponses, GetMemberAreReferencedData, GetMemberAreReferencedErrors, GetMemberAreReferencedResponses, GetMemberByIdData, GetMemberByIdErrors, GetMemberByIdReferencedByData, GetMemberByIdReferencedByErrors, GetMemberByIdReferencedByResponses, GetMemberByIdReferencedDescendantsData, GetMemberByIdReferencedDescendantsErrors, GetMemberByIdReferencedDescendantsResponses, GetMemberByIdResponses, GetMemberConfigurationData, GetMemberConfigurationErrors, GetMemberConfigurationResponses, GetMemberGroupByIdData, GetMemberGroupByIdErrors, GetMemberGroupByIdResponses, GetMemberGroupData, GetMemberGroupErrors, GetMemberGroupResponses, GetMemberTypeByIdCompositionReferencesData, GetMemberTypeByIdCompositionReferencesErrors, GetMemberTypeByIdCompositionReferencesResponses, GetMemberTypeByIdData, GetMemberTypeByIdErrors, GetMemberTypeByIdResponses, GetMemberTypeConfigurationData, GetMemberTypeConfigurationErrors, GetMemberTypeConfigurationResponses, GetModelsBuilderDashboardData, GetModelsBuilderDashboardErrors, GetModelsBuilderDashboardResponses, GetModelsBuilderStatusData, GetModelsBuilderStatusErrors, GetModelsBuilderStatusResponses, GetObjectTypesData, GetObjectTypesErrors, GetObjectTypesResponses, GetOembedQueryData, GetOembedQueryErrors, GetOembedQueryResponses, GetPackageConfigurationData, GetPackageConfigurationErrors, GetPackageConfigurationResponses, GetPackageCreatedByIdData, GetPackageCreatedByIdDownloadData, GetPackageCreatedByIdDownloadErrors, GetPackageCreatedByIdDownloadResponses, GetPackageCreatedByIdErrors, GetPackageCreatedByIdResponses, GetPackageCreatedData, GetPackageCreatedErrors, GetPackageCreatedResponses, GetPackageMigrationStatusData, GetPackageMigrationStatusErrors, GetPackageMigrationStatusResponses, GetPartialViewByPathData, GetPartialViewByPathErrors, GetPartialViewByPathResponses, GetPartialViewFolderByPathData, GetPartialViewFolderByPathErrors, GetPartialViewFolderByPathResponses, GetPartialViewSnippetByIdData, GetPartialViewSnippetByIdErrors, GetPartialViewSnippetByIdResponses, GetPartialViewSnippetData, GetPartialViewSnippetErrors, GetPartialViewSnippetResponses, GetProfilingStatusData, GetProfilingStatusErrors, GetProfilingStatusResponses, GetPropertyTypeIsUsedData, GetPropertyTypeIsUsedErrors, GetPropertyTypeIsUsedResponses, GetPublishedCacheRebuildStatusData, GetPublishedCacheRebuildStatusErrors, GetPublishedCacheRebuildStatusResponses, GetRecycleBinDocumentByIdOriginalParentData, GetRecycleBinDocumentByIdOriginalParentErrors, GetRecycleBinDocumentByIdOriginalParentResponses, GetRecycleBinDocumentChildrenData, GetRecycleBinDocumentChildrenErrors, GetRecycleBinDocumentChildrenResponses, GetRecycleBinDocumentReferencedByData, GetRecycleBinDocumentReferencedByErrors, GetRecycleBinDocumentReferencedByResponses, GetRecycleBinDocumentRootData, GetRecycleBinDocumentRootErrors, GetRecycleBinDocumentRootResponses, GetRecycleBinDocumentSiblingsData, GetRecycleBinDocumentSiblingsErrors, GetRecycleBinDocumentSiblingsResponses, GetRecycleBinMediaByIdOriginalParentData, GetRecycleBinMediaByIdOriginalParentErrors, GetRecycleBinMediaByIdOriginalParentResponses, GetRecycleBinMediaChildrenData, GetRecycleBinMediaChildrenErrors, GetRecycleBinMediaChildrenResponses, GetRecycleBinMediaReferencedByData, GetRecycleBinMediaReferencedByErrors, GetRecycleBinMediaReferencedByResponses, GetRecycleBinMediaRootData, GetRecycleBinMediaRootErrors, GetRecycleBinMediaRootResponses, GetRecycleBinMediaSiblingsData, GetRecycleBinMediaSiblingsErrors, GetRecycleBinMediaSiblingsResponses, GetRedirectManagementByIdData, GetRedirectManagementByIdErrors, GetRedirectManagementByIdResponses, GetRedirectManagementData, GetRedirectManagementErrors, GetRedirectManagementResponses, GetRedirectManagementStatusData, GetRedirectManagementStatusErrors, GetRedirectManagementStatusResponses, GetRelationByRelationTypeIdData, GetRelationByRelationTypeIdErrors, GetRelationByRelationTypeIdResponses, GetRelationTypeByIdData, GetRelationTypeByIdErrors, GetRelationTypeByIdResponses, GetRelationTypeData, GetRelationTypeErrors, GetRelationTypeResponses, GetScriptByPathData, GetScriptByPathErrors, GetScriptByPathResponses, GetScriptFolderByPathData, GetScriptFolderByPathErrors, GetScriptFolderByPathResponses, GetSearcherBySearcherNameQueryData, GetSearcherBySearcherNameQueryErrors, GetSearcherBySearcherNameQueryResponses, GetSearcherData, GetSearcherErrors, GetSearcherResponses, GetSecurityConfigurationData, GetSecurityConfigurationErrors, GetSecurityConfigurationResponses, GetSegmentData, GetSegmentErrors, GetSegmentResponses, GetServerConfigurationData, GetServerConfigurationResponses, GetServerInformationData, GetServerInformationErrors, GetServerInformationResponses, GetServerStatusData, GetServerStatusErrors, GetServerStatusResponses, GetServerTroubleshootingData, GetServerTroubleshootingErrors, GetServerTroubleshootingResponses, GetServerUpgradeCheckData, GetServerUpgradeCheckErrors, GetServerUpgradeCheckResponses, GetStylesheetByPathData, GetStylesheetByPathErrors, GetStylesheetByPathResponses, GetStylesheetFolderByPathData, GetStylesheetFolderByPathErrors, GetStylesheetFolderByPathResponses, GetTagData, GetTagErrors, GetTagResponses, GetTelemetryData, GetTelemetryErrors, GetTelemetryLevelData, GetTelemetryLevelErrors, GetTelemetryLevelResponses, GetTelemetryResponses, GetTemplateByIdData, GetTemplateByIdErrors, GetTemplateByIdResponses, GetTemplateConfigurationData, GetTemplateConfigurationErrors, GetTemplateConfigurationResponses, GetTemplateQuerySettingsData, GetTemplateQuerySettingsErrors, GetTemplateQuerySettingsResponses, GetTemporaryFileByIdData, GetTemporaryFileByIdErrors, GetTemporaryFileByIdResponses, GetTemporaryFileConfigurationData, GetTemporaryFileConfigurationErrors, GetTemporaryFileConfigurationResponses, GetTreeDataTypeAncestorsData, GetTreeDataTypeAncestorsErrors, GetTreeDataTypeAncestorsResponses, GetTreeDataTypeChildrenData, GetTreeDataTypeChildrenErrors, GetTreeDataTypeChildrenResponses, GetTreeDataTypeRootData, GetTreeDataTypeRootErrors, GetTreeDataTypeRootResponses, GetTreeDataTypeSiblingsData, GetTreeDataTypeSiblingsErrors, GetTreeDataTypeSiblingsResponses, GetTreeDictionaryAncestorsData, GetTreeDictionaryAncestorsErrors, GetTreeDictionaryAncestorsResponses, GetTreeDictionaryChildrenData, GetTreeDictionaryChildrenErrors, GetTreeDictionaryChildrenResponses, GetTreeDictionaryRootData, GetTreeDictionaryRootErrors, GetTreeDictionaryRootResponses, GetTreeDocumentAncestorsData, GetTreeDocumentAncestorsErrors, GetTreeDocumentAncestorsResponses, GetTreeDocumentBlueprintAncestorsData, GetTreeDocumentBlueprintAncestorsErrors, GetTreeDocumentBlueprintAncestorsResponses, GetTreeDocumentBlueprintChildrenData, GetTreeDocumentBlueprintChildrenErrors, GetTreeDocumentBlueprintChildrenResponses, GetTreeDocumentBlueprintRootData, GetTreeDocumentBlueprintRootErrors, GetTreeDocumentBlueprintRootResponses, GetTreeDocumentBlueprintSiblingsData, GetTreeDocumentBlueprintSiblingsErrors, GetTreeDocumentBlueprintSiblingsResponses, GetTreeDocumentChildrenData, GetTreeDocumentChildrenErrors, GetTreeDocumentChildrenResponses, GetTreeDocumentRootData, GetTreeDocumentRootErrors, GetTreeDocumentRootResponses, GetTreeDocumentSiblingsData, GetTreeDocumentSiblingsErrors, GetTreeDocumentSiblingsResponses, GetTreeDocumentTypeAncestorsData, GetTreeDocumentTypeAncestorsErrors, GetTreeDocumentTypeAncestorsResponses, GetTreeDocumentTypeChildrenData, GetTreeDocumentTypeChildrenErrors, GetTreeDocumentTypeChildrenResponses, GetTreeDocumentTypeRootData, GetTreeDocumentTypeRootErrors, GetTreeDocumentTypeRootResponses, GetTreeDocumentTypeSiblingsData, GetTreeDocumentTypeSiblingsErrors, GetTreeDocumentTypeSiblingsResponses, GetTreeMediaAncestorsData, GetTreeMediaAncestorsErrors, GetTreeMediaAncestorsResponses, GetTreeMediaChildrenData, GetTreeMediaChildrenErrors, GetTreeMediaChildrenResponses, GetTreeMediaRootData, GetTreeMediaRootErrors, GetTreeMediaRootResponses, GetTreeMediaSiblingsData, GetTreeMediaSiblingsErrors, GetTreeMediaSiblingsResponses, GetTreeMediaTypeAncestorsData, GetTreeMediaTypeAncestorsErrors, GetTreeMediaTypeAncestorsResponses, GetTreeMediaTypeChildrenData, GetTreeMediaTypeChildrenErrors, GetTreeMediaTypeChildrenResponses, GetTreeMediaTypeRootData, GetTreeMediaTypeRootErrors, GetTreeMediaTypeRootResponses, GetTreeMediaTypeSiblingsData, GetTreeMediaTypeSiblingsErrors, GetTreeMediaTypeSiblingsResponses, GetTreeMemberGroupRootData, GetTreeMemberGroupRootErrors, GetTreeMemberGroupRootResponses, GetTreeMemberTypeRootData, GetTreeMemberTypeRootErrors, GetTreeMemberTypeRootResponses, GetTreeMemberTypeSiblingsData, GetTreeMemberTypeSiblingsErrors, GetTreeMemberTypeSiblingsResponses, GetTreePartialViewAncestorsData, GetTreePartialViewAncestorsErrors, GetTreePartialViewAncestorsResponses, GetTreePartialViewChildrenData, GetTreePartialViewChildrenErrors, GetTreePartialViewChildrenResponses, GetTreePartialViewRootData, GetTreePartialViewRootErrors, GetTreePartialViewRootResponses, GetTreePartialViewSiblingsData, GetTreePartialViewSiblingsErrors, GetTreePartialViewSiblingsResponses, GetTreeScriptAncestorsData, GetTreeScriptAncestorsErrors, GetTreeScriptAncestorsResponses, GetTreeScriptChildrenData, GetTreeScriptChildrenErrors, GetTreeScriptChildrenResponses, GetTreeScriptRootData, GetTreeScriptRootErrors, GetTreeScriptRootResponses, GetTreeScriptSiblingsData, GetTreeScriptSiblingsErrors, GetTreeScriptSiblingsResponses, GetTreeStaticFileAncestorsData, GetTreeStaticFileAncestorsErrors, GetTreeStaticFileAncestorsResponses, GetTreeStaticFileChildrenData, GetTreeStaticFileChildrenErrors, GetTreeStaticFileChildrenResponses, GetTreeStaticFileRootData, GetTreeStaticFileRootErrors, GetTreeStaticFileRootResponses, GetTreeStylesheetAncestorsData, GetTreeStylesheetAncestorsErrors, GetTreeStylesheetAncestorsResponses, GetTreeStylesheetChildrenData, GetTreeStylesheetChildrenErrors, GetTreeStylesheetChildrenResponses, GetTreeStylesheetRootData, GetTreeStylesheetRootErrors, GetTreeStylesheetRootResponses, GetTreeStylesheetSiblingsData, GetTreeStylesheetSiblingsErrors, GetTreeStylesheetSiblingsResponses, GetTreeTemplateAncestorsData, GetTreeTemplateAncestorsErrors, GetTreeTemplateAncestorsResponses, GetTreeTemplateChildrenData, GetTreeTemplateChildrenErrors, GetTreeTemplateChildrenResponses, GetTreeTemplateRootData, GetTreeTemplateRootErrors, GetTreeTemplateRootResponses, GetTreeTemplateSiblingsData, GetTreeTemplateSiblingsErrors, GetTreeTemplateSiblingsResponses, GetUpgradeSettingsData, GetUpgradeSettingsErrors, GetUpgradeSettingsResponses, GetUserById2FaData, GetUserById2FaErrors, GetUserById2FaResponses, GetUserByIdCalculateStartNodesData, GetUserByIdCalculateStartNodesErrors, GetUserByIdCalculateStartNodesResponses, GetUserByIdClientCredentialsData, GetUserByIdClientCredentialsErrors, GetUserByIdClientCredentialsResponses, GetUserByIdData, GetUserByIdErrors, GetUserByIdResponses, GetUserConfigurationData, GetUserConfigurationErrors, GetUserConfigurationResponses, GetUserCurrent2FaByProviderNameData, GetUserCurrent2FaByProviderNameErrors, GetUserCurrent2FaByProviderNameResponses, GetUserCurrent2FaData, GetUserCurrent2FaErrors, GetUserCurrent2FaResponses, GetUserCurrentConfigurationData, GetUserCurrentConfigurationErrors, GetUserCurrentConfigurationResponses, GetUserCurrentData, GetUserCurrentErrors, GetUserCurrentLoginProvidersData, GetUserCurrentLoginProvidersErrors, GetUserCurrentLoginProvidersResponses, GetUserCurrentPermissionsData, GetUserCurrentPermissionsDocumentData, GetUserCurrentPermissionsDocumentErrors, GetUserCurrentPermissionsDocumentResponses, GetUserCurrentPermissionsErrors, GetUserCurrentPermissionsMediaData, GetUserCurrentPermissionsMediaErrors, GetUserCurrentPermissionsMediaResponses, GetUserCurrentPermissionsResponses, GetUserCurrentResponses, GetUserData, GetUserDataByIdData, GetUserDataByIdErrors, GetUserDataByIdResponses, GetUserDataData, GetUserDataErrors, GetUserDataResponses, GetUserErrors, GetUserGroupByIdData, GetUserGroupByIdErrors, GetUserGroupByIdResponses, GetUserGroupData, GetUserGroupErrors, GetUserGroupResponses, GetUserResponses, GetWebhookByIdData, GetWebhookByIdErrors, GetWebhookByIdLogsData, GetWebhookByIdLogsErrors, GetWebhookByIdLogsResponses, GetWebhookByIdResponses, GetWebhookData, GetWebhookErrors, GetWebhookEventsData, GetWebhookEventsErrors, GetWebhookEventsResponses, GetWebhookLogsData, GetWebhookLogsErrors, GetWebhookLogsResponses, GetWebhookResponses, PostDataTypeByIdCopyData, PostDataTypeByIdCopyErrors, PostDataTypeByIdCopyResponses, PostDataTypeData, PostDataTypeErrors, PostDataTypeFolderData, PostDataTypeFolderErrors, PostDataTypeFolderResponses, PostDataTypeResponses, PostDictionaryData, PostDictionaryErrors, PostDictionaryImportData, PostDictionaryImportErrors, PostDictionaryImportResponses, PostDictionaryResponses, PostDocumentBlueprintData, PostDocumentBlueprintErrors, PostDocumentBlueprintFolderData, PostDocumentBlueprintFolderErrors, PostDocumentBlueprintFolderResponses, PostDocumentBlueprintFromDocumentData, PostDocumentBlueprintFromDocumentErrors, PostDocumentBlueprintFromDocumentResponses, PostDocumentBlueprintResponses, PostDocumentByIdCopyData, PostDocumentByIdCopyErrors, PostDocumentByIdCopyResponses, PostDocumentByIdPublicAccessData, PostDocumentByIdPublicAccessErrors, PostDocumentByIdPublicAccessResponses, PostDocumentData, PostDocumentErrors, PostDocumentResponses, PostDocumentTypeAvailableCompositionsData, PostDocumentTypeAvailableCompositionsErrors, PostDocumentTypeAvailableCompositionsResponses, PostDocumentTypeByIdCopyData, PostDocumentTypeByIdCopyErrors, PostDocumentTypeByIdCopyResponses, PostDocumentTypeData, PostDocumentTypeErrors, PostDocumentTypeFolderData, PostDocumentTypeFolderErrors, PostDocumentTypeFolderResponses, PostDocumentTypeImportData, PostDocumentTypeImportErrors, PostDocumentTypeImportResponses, PostDocumentTypeResponses, PostDocumentValidateData, PostDocumentValidateErrors, PostDocumentValidateResponses, PostDocumentVersionByIdRollbackData, PostDocumentVersionByIdRollbackErrors, PostDocumentVersionByIdRollbackResponses, PostDynamicRootQueryData, PostDynamicRootQueryErrors, PostDynamicRootQueryResponses, PostHealthCheckExecuteActionData, PostHealthCheckExecuteActionErrors, PostHealthCheckExecuteActionResponses, PostHealthCheckGroupByNameCheckData, PostHealthCheckGroupByNameCheckErrors, PostHealthCheckGroupByNameCheckResponses, PostIndexerByIndexNameRebuildData, PostIndexerByIndexNameRebuildErrors, PostIndexerByIndexNameRebuildResponses, PostInstallSetupData, PostInstallSetupErrors, PostInstallSetupResponses, PostInstallValidateDatabaseData, PostInstallValidateDatabaseErrors, PostInstallValidateDatabaseResponses, PostLanguageData, PostLanguageErrors, PostLanguageResponses, PostLogViewerSavedSearchData, PostLogViewerSavedSearchErrors, PostLogViewerSavedSearchResponses, PostMediaData, PostMediaErrors, PostMediaResponses, PostMediaTypeAvailableCompositionsData, PostMediaTypeAvailableCompositionsErrors, PostMediaTypeAvailableCompositionsResponses, PostMediaTypeByIdCopyData, PostMediaTypeByIdCopyErrors, PostMediaTypeByIdCopyResponses, PostMediaTypeData, PostMediaTypeErrors, PostMediaTypeFolderData, PostMediaTypeFolderErrors, PostMediaTypeFolderResponses, PostMediaTypeImportData, PostMediaTypeImportErrors, PostMediaTypeImportResponses, PostMediaTypeResponses, PostMediaValidateData, PostMediaValidateErrors, PostMediaValidateResponses, PostMemberData, PostMemberErrors, PostMemberGroupData, PostMemberGroupErrors, PostMemberGroupResponses, PostMemberResponses, PostMemberTypeAvailableCompositionsData, PostMemberTypeAvailableCompositionsErrors, PostMemberTypeAvailableCompositionsResponses, PostMemberTypeByIdCopyData, PostMemberTypeByIdCopyErrors, PostMemberTypeByIdCopyResponses, PostMemberTypeData, PostMemberTypeErrors, PostMemberTypeResponses, PostMemberValidateData, PostMemberValidateErrors, PostMemberValidateResponses, PostModelsBuilderBuildData, PostModelsBuilderBuildErrors, PostModelsBuilderBuildResponses, PostPackageByNameRunMigrationData, PostPackageByNameRunMigrationErrors, PostPackageByNameRunMigrationResponses, PostPackageCreatedData, PostPackageCreatedErrors, PostPackageCreatedResponses, PostPartialViewData, PostPartialViewErrors, PostPartialViewFolderData, PostPartialViewFolderErrors, PostPartialViewFolderResponses, PostPartialViewResponses, PostPreviewData, PostPreviewErrors, PostPreviewResponses, PostPublishedCacheRebuildData, PostPublishedCacheRebuildErrors, PostPublishedCacheRebuildResponses, PostPublishedCacheReloadData, PostPublishedCacheReloadErrors, PostPublishedCacheReloadResponses, PostRedirectManagementStatusData, PostRedirectManagementStatusErrors, PostRedirectManagementStatusResponses, PostScriptData, PostScriptErrors, PostScriptFolderData, PostScriptFolderErrors, PostScriptFolderResponses, PostScriptResponses, PostSecurityForgotPasswordData, PostSecurityForgotPasswordErrors, PostSecurityForgotPasswordResetData, PostSecurityForgotPasswordResetErrors, PostSecurityForgotPasswordResetResponses, PostSecurityForgotPasswordResponses, PostSecurityForgotPasswordVerifyData, PostSecurityForgotPasswordVerifyErrors, PostSecurityForgotPasswordVerifyResponses, PostStylesheetData, PostStylesheetErrors, PostStylesheetFolderData, PostStylesheetFolderErrors, PostStylesheetFolderResponses, PostStylesheetResponses, PostTelemetryLevelData, PostTelemetryLevelErrors, PostTelemetryLevelResponses, PostTemplateData, PostTemplateErrors, PostTemplateQueryExecuteData, PostTemplateQueryExecuteErrors, PostTemplateQueryExecuteResponses, PostTemplateResponses, PostTemporaryFileData, PostTemporaryFileErrors, PostTemporaryFileResponses, PostUpgradeAuthorizeData, PostUpgradeAuthorizeErrors, PostUpgradeAuthorizeResponses, PostUserAvatarByIdData, PostUserAvatarByIdErrors, PostUserAvatarByIdResponses, PostUserByIdChangePasswordData, PostUserByIdChangePasswordErrors, PostUserByIdChangePasswordResponses, PostUserByIdClientCredentialsData, PostUserByIdClientCredentialsErrors, PostUserByIdClientCredentialsResponses, PostUserByIdResetPasswordData, PostUserByIdResetPasswordErrors, PostUserByIdResetPasswordResponses, PostUserCurrent2FaByProviderNameData, PostUserCurrent2FaByProviderNameErrors, PostUserCurrent2FaByProviderNameResponses, PostUserCurrentAvatarData, PostUserCurrentAvatarErrors, PostUserCurrentAvatarResponses, PostUserCurrentChangePasswordData, PostUserCurrentChangePasswordErrors, PostUserCurrentChangePasswordResponses, PostUserData, PostUserDataData, PostUserDataErrors, PostUserDataResponses, PostUserDisableData, PostUserDisableErrors, PostUserDisableResponses, PostUserEnableData, PostUserEnableErrors, PostUserEnableResponses, PostUserErrors, PostUserGroupByIdUsersData, PostUserGroupByIdUsersErrors, PostUserGroupByIdUsersResponses, PostUserGroupData, PostUserGroupErrors, PostUserGroupResponses, PostUserInviteCreatePasswordData, PostUserInviteCreatePasswordErrors, PostUserInviteCreatePasswordResponses, PostUserInviteData, PostUserInviteErrors, PostUserInviteResendData, PostUserInviteResendErrors, PostUserInviteResendResponses, PostUserInviteResponses, PostUserInviteVerifyData, PostUserInviteVerifyErrors, PostUserInviteVerifyResponses, PostUserResponses, PostUserSetUserGroupsData, PostUserSetUserGroupsErrors, PostUserSetUserGroupsResponses, PostUserUnlockData, PostUserUnlockErrors, PostUserUnlockResponses, PostWebhookData, PostWebhookErrors, PostWebhookResponses, PutDataTypeByIdData, PutDataTypeByIdErrors, PutDataTypeByIdMoveData, PutDataTypeByIdMoveErrors, PutDataTypeByIdMoveResponses, PutDataTypeByIdResponses, PutDataTypeFolderByIdData, PutDataTypeFolderByIdErrors, PutDataTypeFolderByIdResponses, PutDictionaryByIdData, PutDictionaryByIdErrors, PutDictionaryByIdMoveData, PutDictionaryByIdMoveErrors, PutDictionaryByIdMoveResponses, PutDictionaryByIdResponses, PutDocumentBlueprintByIdData, PutDocumentBlueprintByIdErrors, PutDocumentBlueprintByIdMoveData, PutDocumentBlueprintByIdMoveErrors, PutDocumentBlueprintByIdMoveResponses, PutDocumentBlueprintByIdResponses, PutDocumentBlueprintFolderByIdData, PutDocumentBlueprintFolderByIdErrors, PutDocumentBlueprintFolderByIdResponses, PutDocumentByIdData, PutDocumentByIdDomainsData, PutDocumentByIdDomainsErrors, PutDocumentByIdDomainsResponses, PutDocumentByIdErrors, PutDocumentByIdMoveData, PutDocumentByIdMoveErrors, PutDocumentByIdMoveResponses, PutDocumentByIdMoveToRecycleBinData, PutDocumentByIdMoveToRecycleBinErrors, PutDocumentByIdMoveToRecycleBinResponses, PutDocumentByIdNotificationsData, PutDocumentByIdNotificationsErrors, PutDocumentByIdNotificationsResponses, PutDocumentByIdPublicAccessData, PutDocumentByIdPublicAccessErrors, PutDocumentByIdPublicAccessResponses, PutDocumentByIdPublishData, PutDocumentByIdPublishErrors, PutDocumentByIdPublishResponses, PutDocumentByIdPublishWithDescendantsData, PutDocumentByIdPublishWithDescendantsErrors, PutDocumentByIdPublishWithDescendantsResponses, PutDocumentByIdResponses, PutDocumentByIdUnpublishData, PutDocumentByIdUnpublishErrors, PutDocumentByIdUnpublishResponses, PutDocumentSortData, PutDocumentSortErrors, PutDocumentSortResponses, PutDocumentTypeByIdData, PutDocumentTypeByIdErrors, PutDocumentTypeByIdImportData, PutDocumentTypeByIdImportErrors, PutDocumentTypeByIdImportResponses, PutDocumentTypeByIdMoveData, PutDocumentTypeByIdMoveErrors, PutDocumentTypeByIdMoveResponses, PutDocumentTypeByIdResponses, PutDocumentTypeFolderByIdData, PutDocumentTypeFolderByIdErrors, PutDocumentTypeFolderByIdResponses, PutDocumentVersionByIdPreventCleanupData, PutDocumentVersionByIdPreventCleanupErrors, PutDocumentVersionByIdPreventCleanupResponses, PutLanguageByIsoCodeData, PutLanguageByIsoCodeErrors, PutLanguageByIsoCodeResponses, PutMediaByIdData, PutMediaByIdErrors, PutMediaByIdMoveData, PutMediaByIdMoveErrors, PutMediaByIdMoveResponses, PutMediaByIdMoveToRecycleBinData, PutMediaByIdMoveToRecycleBinErrors, PutMediaByIdMoveToRecycleBinResponses, PutMediaByIdResponses, PutMediaByIdValidateData, PutMediaByIdValidateErrors, PutMediaByIdValidateResponses, PutMediaSortData, PutMediaSortErrors, PutMediaSortResponses, PutMediaTypeByIdData, PutMediaTypeByIdErrors, PutMediaTypeByIdImportData, PutMediaTypeByIdImportErrors, PutMediaTypeByIdImportResponses, PutMediaTypeByIdMoveData, PutMediaTypeByIdMoveErrors, PutMediaTypeByIdMoveResponses, PutMediaTypeByIdResponses, PutMediaTypeFolderByIdData, PutMediaTypeFolderByIdErrors, PutMediaTypeFolderByIdResponses, PutMemberByIdData, PutMemberByIdErrors, PutMemberByIdResponses, PutMemberByIdValidateData, PutMemberByIdValidateErrors, PutMemberByIdValidateResponses, PutMemberGroupByIdData, PutMemberGroupByIdErrors, PutMemberGroupByIdResponses, PutMemberTypeByIdData, PutMemberTypeByIdErrors, PutMemberTypeByIdResponses, PutPackageCreatedByIdData, PutPackageCreatedByIdErrors, PutPackageCreatedByIdResponses, PutPartialViewByPathData, PutPartialViewByPathErrors, PutPartialViewByPathRenameData, PutPartialViewByPathRenameErrors, PutPartialViewByPathRenameResponses, PutPartialViewByPathResponses, PutProfilingStatusData, PutProfilingStatusErrors, PutProfilingStatusResponses, PutRecycleBinDocumentByIdRestoreData, PutRecycleBinDocumentByIdRestoreErrors, PutRecycleBinDocumentByIdRestoreResponses, PutRecycleBinMediaByIdRestoreData, PutRecycleBinMediaByIdRestoreErrors, PutRecycleBinMediaByIdRestoreResponses, PutScriptByPathData, PutScriptByPathErrors, PutScriptByPathRenameData, PutScriptByPathRenameErrors, PutScriptByPathRenameResponses, PutScriptByPathResponses, PutStylesheetByPathData, PutStylesheetByPathErrors, PutStylesheetByPathRenameData, PutStylesheetByPathRenameErrors, PutStylesheetByPathRenameResponses, PutStylesheetByPathResponses, PutTemplateByIdData, PutTemplateByIdErrors, PutTemplateByIdResponses, PutUmbracoManagementApiV11DocumentByIdValidate11Data, PutUmbracoManagementApiV11DocumentByIdValidate11Errors, PutUmbracoManagementApiV11DocumentByIdValidate11Responses, PutUserByIdData, PutUserByIdErrors, PutUserByIdResponses, PutUserDataData, PutUserDataErrors, PutUserDataResponses, PutUserGroupByIdData, PutUserGroupByIdErrors, PutUserGroupByIdResponses, PutWebhookByIdData, PutWebhookByIdErrors, PutWebhookByIdResponses } from './types.gen'; +import type { DeleteDataTypeByIdData, DeleteDataTypeByIdErrors, DeleteDataTypeByIdResponses, DeleteDataTypeFolderByIdData, DeleteDataTypeFolderByIdErrors, DeleteDataTypeFolderByIdResponses, DeleteDictionaryByIdData, DeleteDictionaryByIdErrors, DeleteDictionaryByIdResponses, DeleteDocumentBlueprintByIdData, DeleteDocumentBlueprintByIdErrors, DeleteDocumentBlueprintByIdResponses, DeleteDocumentBlueprintFolderByIdData, DeleteDocumentBlueprintFolderByIdErrors, DeleteDocumentBlueprintFolderByIdResponses, DeleteDocumentByIdData, DeleteDocumentByIdErrors, DeleteDocumentByIdPublicAccessData, DeleteDocumentByIdPublicAccessErrors, DeleteDocumentByIdPublicAccessResponses, DeleteDocumentByIdResponses, DeleteDocumentTypeByIdData, DeleteDocumentTypeByIdErrors, DeleteDocumentTypeByIdResponses, DeleteDocumentTypeFolderByIdData, DeleteDocumentTypeFolderByIdErrors, DeleteDocumentTypeFolderByIdResponses, DeleteLanguageByIsoCodeData, DeleteLanguageByIsoCodeErrors, DeleteLanguageByIsoCodeResponses, DeleteLogViewerSavedSearchByNameData, DeleteLogViewerSavedSearchByNameErrors, DeleteLogViewerSavedSearchByNameResponses, DeleteMediaByIdData, DeleteMediaByIdErrors, DeleteMediaByIdResponses, DeleteMediaTypeByIdData, DeleteMediaTypeByIdErrors, DeleteMediaTypeByIdResponses, DeleteMediaTypeFolderByIdData, DeleteMediaTypeFolderByIdErrors, DeleteMediaTypeFolderByIdResponses, DeleteMemberByIdData, DeleteMemberByIdErrors, DeleteMemberByIdResponses, DeleteMemberGroupByIdData, DeleteMemberGroupByIdErrors, DeleteMemberGroupByIdResponses, DeleteMemberTypeByIdData, DeleteMemberTypeByIdErrors, DeleteMemberTypeByIdResponses, DeletePackageCreatedByIdData, DeletePackageCreatedByIdErrors, DeletePackageCreatedByIdResponses, DeletePartialViewByPathData, DeletePartialViewByPathErrors, DeletePartialViewByPathResponses, DeletePartialViewFolderByPathData, DeletePartialViewFolderByPathErrors, DeletePartialViewFolderByPathResponses, DeletePreviewData, DeletePreviewResponses, DeleteRecycleBinDocumentByIdData, DeleteRecycleBinDocumentByIdErrors, DeleteRecycleBinDocumentByIdResponses, DeleteRecycleBinDocumentData, DeleteRecycleBinDocumentErrors, DeleteRecycleBinDocumentResponses, DeleteRecycleBinMediaByIdData, DeleteRecycleBinMediaByIdErrors, DeleteRecycleBinMediaByIdResponses, DeleteRecycleBinMediaData, DeleteRecycleBinMediaErrors, DeleteRecycleBinMediaResponses, DeleteRedirectManagementByIdData, DeleteRedirectManagementByIdErrors, DeleteRedirectManagementByIdResponses, DeleteScriptByPathData, DeleteScriptByPathErrors, DeleteScriptByPathResponses, DeleteScriptFolderByPathData, DeleteScriptFolderByPathErrors, DeleteScriptFolderByPathResponses, DeleteStylesheetByPathData, DeleteStylesheetByPathErrors, DeleteStylesheetByPathResponses, DeleteStylesheetFolderByPathData, DeleteStylesheetFolderByPathErrors, DeleteStylesheetFolderByPathResponses, DeleteTemplateByIdData, DeleteTemplateByIdErrors, DeleteTemplateByIdResponses, DeleteTemporaryFileByIdData, DeleteTemporaryFileByIdErrors, DeleteTemporaryFileByIdResponses, DeleteUserAvatarByIdData, DeleteUserAvatarByIdErrors, DeleteUserAvatarByIdResponses, DeleteUserById2FaByProviderNameData, DeleteUserById2FaByProviderNameErrors, DeleteUserById2FaByProviderNameResponses, DeleteUserByIdClientCredentialsByClientIdData, DeleteUserByIdClientCredentialsByClientIdErrors, DeleteUserByIdClientCredentialsByClientIdResponses, DeleteUserByIdData, DeleteUserByIdErrors, DeleteUserByIdResponses, DeleteUserCurrent2FaByProviderNameData, DeleteUserCurrent2FaByProviderNameErrors, DeleteUserCurrent2FaByProviderNameResponses, DeleteUserData, DeleteUserDataByIdData, DeleteUserDataByIdErrors, DeleteUserDataByIdResponses, DeleteUserErrors, DeleteUserGroupByIdData, DeleteUserGroupByIdErrors, DeleteUserGroupByIdResponses, DeleteUserGroupByIdUsersData, DeleteUserGroupByIdUsersErrors, DeleteUserGroupByIdUsersResponses, DeleteUserGroupData, DeleteUserGroupErrors, DeleteUserGroupResponses, DeleteUserResponses, DeleteWebhookByIdData, DeleteWebhookByIdErrors, DeleteWebhookByIdResponses, GetCollectionDocumentByIdData, GetCollectionDocumentByIdErrors, GetCollectionDocumentByIdResponses, GetCollectionMediaData, GetCollectionMediaErrors, GetCollectionMediaResponses, GetCultureData, GetCultureErrors, GetCultureResponses, GetDataTypeByIdData, GetDataTypeByIdErrors, GetDataTypeByIdIsUsedData, GetDataTypeByIdIsUsedErrors, GetDataTypeByIdIsUsedResponses, GetDataTypeByIdReferencedByData, GetDataTypeByIdReferencedByErrors, GetDataTypeByIdReferencedByResponses, GetDataTypeByIdResponses, GetDataTypeConfigurationData, GetDataTypeConfigurationErrors, GetDataTypeConfigurationResponses, GetDataTypeFolderByIdData, GetDataTypeFolderByIdErrors, GetDataTypeFolderByIdResponses, GetDictionaryByIdData, GetDictionaryByIdErrors, GetDictionaryByIdExportData, GetDictionaryByIdExportErrors, GetDictionaryByIdExportResponses, GetDictionaryByIdResponses, GetDictionaryData, GetDictionaryErrors, GetDictionaryResponses, GetDocumentAreReferencedData, GetDocumentAreReferencedErrors, GetDocumentAreReferencedResponses, GetDocumentBlueprintByIdData, GetDocumentBlueprintByIdErrors, GetDocumentBlueprintByIdResponses, GetDocumentBlueprintByIdScaffoldData, GetDocumentBlueprintByIdScaffoldErrors, GetDocumentBlueprintByIdScaffoldResponses, GetDocumentBlueprintFolderByIdData, GetDocumentBlueprintFolderByIdErrors, GetDocumentBlueprintFolderByIdResponses, GetDocumentByIdAuditLogData, GetDocumentByIdAuditLogErrors, GetDocumentByIdAuditLogResponses, GetDocumentByIdAvailableSegmentOptionsData, GetDocumentByIdAvailableSegmentOptionsErrors, GetDocumentByIdAvailableSegmentOptionsResponses, GetDocumentByIdData, GetDocumentByIdDomainsData, GetDocumentByIdDomainsErrors, GetDocumentByIdDomainsResponses, GetDocumentByIdErrors, GetDocumentByIdNotificationsData, GetDocumentByIdNotificationsErrors, GetDocumentByIdNotificationsResponses, GetDocumentByIdPreviewUrlData, GetDocumentByIdPreviewUrlErrors, GetDocumentByIdPreviewUrlResponses, GetDocumentByIdPublicAccessData, GetDocumentByIdPublicAccessErrors, GetDocumentByIdPublicAccessResponses, GetDocumentByIdPublishedData, GetDocumentByIdPublishedErrors, GetDocumentByIdPublishedResponses, GetDocumentByIdPublishWithDescendantsResultByTaskIdData, GetDocumentByIdPublishWithDescendantsResultByTaskIdErrors, GetDocumentByIdPublishWithDescendantsResultByTaskIdResponses, GetDocumentByIdReferencedByData, GetDocumentByIdReferencedByErrors, GetDocumentByIdReferencedByResponses, GetDocumentByIdReferencedDescendantsData, GetDocumentByIdReferencedDescendantsErrors, GetDocumentByIdReferencedDescendantsResponses, GetDocumentByIdResponses, GetDocumentConfigurationData, GetDocumentConfigurationErrors, GetDocumentConfigurationResponses, GetDocumentTypeAllowedAtRootData, GetDocumentTypeAllowedAtRootErrors, GetDocumentTypeAllowedAtRootResponses, GetDocumentTypeByIdAllowedChildrenData, GetDocumentTypeByIdAllowedChildrenErrors, GetDocumentTypeByIdAllowedChildrenResponses, GetDocumentTypeByIdBlueprintData, GetDocumentTypeByIdBlueprintErrors, GetDocumentTypeByIdBlueprintResponses, GetDocumentTypeByIdCompositionReferencesData, GetDocumentTypeByIdCompositionReferencesErrors, GetDocumentTypeByIdCompositionReferencesResponses, GetDocumentTypeByIdData, GetDocumentTypeByIdErrors, GetDocumentTypeByIdExportData, GetDocumentTypeByIdExportErrors, GetDocumentTypeByIdExportResponses, GetDocumentTypeByIdResponses, GetDocumentTypeConfigurationData, GetDocumentTypeConfigurationErrors, GetDocumentTypeConfigurationResponses, GetDocumentTypeFolderByIdData, GetDocumentTypeFolderByIdErrors, GetDocumentTypeFolderByIdResponses, GetDocumentUrlsData, GetDocumentUrlsErrors, GetDocumentUrlsResponses, GetDocumentVersionByIdData, GetDocumentVersionByIdErrors, GetDocumentVersionByIdResponses, GetDocumentVersionData, GetDocumentVersionErrors, GetDocumentVersionResponses, GetDynamicRootStepsData, GetDynamicRootStepsErrors, GetDynamicRootStepsResponses, GetFilterDataTypeData, GetFilterDataTypeErrors, GetFilterDataTypeResponses, GetFilterMemberData, GetFilterMemberErrors, GetFilterMemberResponses, GetFilterUserData, GetFilterUserErrors, GetFilterUserGroupData, GetFilterUserGroupErrors, GetFilterUserGroupResponses, GetFilterUserResponses, GetHealthCheckGroupByNameData, GetHealthCheckGroupByNameErrors, GetHealthCheckGroupByNameResponses, GetHealthCheckGroupData, GetHealthCheckGroupErrors, GetHealthCheckGroupResponses, GetHelpData, GetHelpErrors, GetHelpResponses, GetImagingResizeUrlsData, GetImagingResizeUrlsErrors, GetImagingResizeUrlsResponses, GetImportAnalyzeData, GetImportAnalyzeErrors, GetImportAnalyzeResponses, GetIndexerByIndexNameData, GetIndexerByIndexNameErrors, GetIndexerByIndexNameResponses, GetIndexerData, GetIndexerErrors, GetIndexerResponses, GetInstallSettingsData, GetInstallSettingsErrors, GetInstallSettingsResponses, GetItemDataTypeData, GetItemDataTypeErrors, GetItemDataTypeResponses, GetItemDataTypeSearchData, GetItemDataTypeSearchErrors, GetItemDataTypeSearchResponses, GetItemDictionaryData, GetItemDictionaryErrors, GetItemDictionaryResponses, GetItemDocumentBlueprintData, GetItemDocumentBlueprintErrors, GetItemDocumentBlueprintResponses, GetItemDocumentData, GetItemDocumentErrors, GetItemDocumentResponses, GetItemDocumentSearchData, GetItemDocumentSearchErrors, GetItemDocumentSearchResponses, GetItemDocumentTypeData, GetItemDocumentTypeErrors, GetItemDocumentTypeResponses, GetItemDocumentTypeSearchData, GetItemDocumentTypeSearchErrors, GetItemDocumentTypeSearchResponses, GetItemLanguageData, GetItemLanguageDefaultData, GetItemLanguageDefaultErrors, GetItemLanguageDefaultResponses, GetItemLanguageErrors, GetItemLanguageResponses, GetItemMediaData, GetItemMediaErrors, GetItemMediaResponses, GetItemMediaSearchData, GetItemMediaSearchErrors, GetItemMediaSearchResponses, GetItemMediaTypeAllowedData, GetItemMediaTypeAllowedErrors, GetItemMediaTypeAllowedResponses, GetItemMediaTypeData, GetItemMediaTypeErrors, GetItemMediaTypeFoldersData, GetItemMediaTypeFoldersErrors, GetItemMediaTypeFoldersResponses, GetItemMediaTypeResponses, GetItemMediaTypeSearchData, GetItemMediaTypeSearchErrors, GetItemMediaTypeSearchResponses, GetItemMemberData, GetItemMemberErrors, GetItemMemberGroupData, GetItemMemberGroupErrors, GetItemMemberGroupResponses, GetItemMemberResponses, GetItemMemberSearchData, GetItemMemberSearchErrors, GetItemMemberSearchResponses, GetItemMemberTypeData, GetItemMemberTypeErrors, GetItemMemberTypeResponses, GetItemMemberTypeSearchData, GetItemMemberTypeSearchErrors, GetItemMemberTypeSearchResponses, GetItemPartialViewData, GetItemPartialViewErrors, GetItemPartialViewResponses, GetItemRelationTypeData, GetItemRelationTypeErrors, GetItemRelationTypeResponses, GetItemScriptData, GetItemScriptErrors, GetItemScriptResponses, GetItemStaticFileData, GetItemStaticFileErrors, GetItemStaticFileResponses, GetItemStylesheetData, GetItemStylesheetErrors, GetItemStylesheetResponses, GetItemTemplateData, GetItemTemplateErrors, GetItemTemplateResponses, GetItemTemplateSearchData, GetItemTemplateSearchErrors, GetItemTemplateSearchResponses, GetItemUserData, GetItemUserErrors, GetItemUserGroupData, GetItemUserGroupErrors, GetItemUserGroupResponses, GetItemUserResponses, GetItemWebhookData, GetItemWebhookErrors, GetItemWebhookResponses, GetLanguageByIsoCodeData, GetLanguageByIsoCodeErrors, GetLanguageByIsoCodeResponses, GetLanguageData, GetLanguageErrors, GetLanguageResponses, GetLogViewerLevelCountData, GetLogViewerLevelCountErrors, GetLogViewerLevelCountResponses, GetLogViewerLevelData, GetLogViewerLevelErrors, GetLogViewerLevelResponses, GetLogViewerLogData, GetLogViewerLogErrors, GetLogViewerLogResponses, GetLogViewerMessageTemplateData, GetLogViewerMessageTemplateErrors, GetLogViewerMessageTemplateResponses, GetLogViewerSavedSearchByNameData, GetLogViewerSavedSearchByNameErrors, GetLogViewerSavedSearchByNameResponses, GetLogViewerSavedSearchData, GetLogViewerSavedSearchErrors, GetLogViewerSavedSearchResponses, GetLogViewerValidateLogsSizeData, GetLogViewerValidateLogsSizeErrors, GetLogViewerValidateLogsSizeResponses, GetManifestManifestData, GetManifestManifestErrors, GetManifestManifestPrivateData, GetManifestManifestPrivateErrors, GetManifestManifestPrivateResponses, GetManifestManifestPublicData, GetManifestManifestPublicResponses, GetManifestManifestResponses, GetMediaAreReferencedData, GetMediaAreReferencedErrors, GetMediaAreReferencedResponses, GetMediaByIdAuditLogData, GetMediaByIdAuditLogErrors, GetMediaByIdAuditLogResponses, GetMediaByIdData, GetMediaByIdErrors, GetMediaByIdReferencedByData, GetMediaByIdReferencedByErrors, GetMediaByIdReferencedByResponses, GetMediaByIdReferencedDescendantsData, GetMediaByIdReferencedDescendantsErrors, GetMediaByIdReferencedDescendantsResponses, GetMediaByIdResponses, GetMediaConfigurationData, GetMediaConfigurationErrors, GetMediaConfigurationResponses, GetMediaTypeAllowedAtRootData, GetMediaTypeAllowedAtRootErrors, GetMediaTypeAllowedAtRootResponses, GetMediaTypeByIdAllowedChildrenData, GetMediaTypeByIdAllowedChildrenErrors, GetMediaTypeByIdAllowedChildrenResponses, GetMediaTypeByIdCompositionReferencesData, GetMediaTypeByIdCompositionReferencesErrors, GetMediaTypeByIdCompositionReferencesResponses, GetMediaTypeByIdData, GetMediaTypeByIdErrors, GetMediaTypeByIdExportData, GetMediaTypeByIdExportErrors, GetMediaTypeByIdExportResponses, GetMediaTypeByIdResponses, GetMediaTypeConfigurationData, GetMediaTypeConfigurationErrors, GetMediaTypeConfigurationResponses, GetMediaTypeFolderByIdData, GetMediaTypeFolderByIdErrors, GetMediaTypeFolderByIdResponses, GetMediaUrlsData, GetMediaUrlsErrors, GetMediaUrlsResponses, GetMemberAreReferencedData, GetMemberAreReferencedErrors, GetMemberAreReferencedResponses, GetMemberByIdData, GetMemberByIdErrors, GetMemberByIdReferencedByData, GetMemberByIdReferencedByErrors, GetMemberByIdReferencedByResponses, GetMemberByIdReferencedDescendantsData, GetMemberByIdReferencedDescendantsErrors, GetMemberByIdReferencedDescendantsResponses, GetMemberByIdResponses, GetMemberConfigurationData, GetMemberConfigurationErrors, GetMemberConfigurationResponses, GetMemberGroupByIdData, GetMemberGroupByIdErrors, GetMemberGroupByIdResponses, GetMemberGroupData, GetMemberGroupErrors, GetMemberGroupResponses, GetMemberTypeByIdCompositionReferencesData, GetMemberTypeByIdCompositionReferencesErrors, GetMemberTypeByIdCompositionReferencesResponses, GetMemberTypeByIdData, GetMemberTypeByIdErrors, GetMemberTypeByIdResponses, GetMemberTypeConfigurationData, GetMemberTypeConfigurationErrors, GetMemberTypeConfigurationResponses, GetModelsBuilderDashboardData, GetModelsBuilderDashboardErrors, GetModelsBuilderDashboardResponses, GetModelsBuilderStatusData, GetModelsBuilderStatusErrors, GetModelsBuilderStatusResponses, GetObjectTypesData, GetObjectTypesErrors, GetObjectTypesResponses, GetOembedQueryData, GetOembedQueryErrors, GetOembedQueryResponses, GetPackageConfigurationData, GetPackageConfigurationErrors, GetPackageConfigurationResponses, GetPackageCreatedByIdData, GetPackageCreatedByIdDownloadData, GetPackageCreatedByIdDownloadErrors, GetPackageCreatedByIdDownloadResponses, GetPackageCreatedByIdErrors, GetPackageCreatedByIdResponses, GetPackageCreatedData, GetPackageCreatedErrors, GetPackageCreatedResponses, GetPackageMigrationStatusData, GetPackageMigrationStatusErrors, GetPackageMigrationStatusResponses, GetPartialViewByPathData, GetPartialViewByPathErrors, GetPartialViewByPathResponses, GetPartialViewFolderByPathData, GetPartialViewFolderByPathErrors, GetPartialViewFolderByPathResponses, GetPartialViewSnippetByIdData, GetPartialViewSnippetByIdErrors, GetPartialViewSnippetByIdResponses, GetPartialViewSnippetData, GetPartialViewSnippetErrors, GetPartialViewSnippetResponses, GetProfilingStatusData, GetProfilingStatusErrors, GetProfilingStatusResponses, GetPropertyTypeIsUsedData, GetPropertyTypeIsUsedErrors, GetPropertyTypeIsUsedResponses, GetPublishedCacheRebuildStatusData, GetPublishedCacheRebuildStatusErrors, GetPublishedCacheRebuildStatusResponses, GetRecycleBinDocumentByIdOriginalParentData, GetRecycleBinDocumentByIdOriginalParentErrors, GetRecycleBinDocumentByIdOriginalParentResponses, GetRecycleBinDocumentChildrenData, GetRecycleBinDocumentChildrenErrors, GetRecycleBinDocumentChildrenResponses, GetRecycleBinDocumentReferencedByData, GetRecycleBinDocumentReferencedByErrors, GetRecycleBinDocumentReferencedByResponses, GetRecycleBinDocumentRootData, GetRecycleBinDocumentRootErrors, GetRecycleBinDocumentRootResponses, GetRecycleBinDocumentSiblingsData, GetRecycleBinDocumentSiblingsErrors, GetRecycleBinDocumentSiblingsResponses, GetRecycleBinMediaByIdOriginalParentData, GetRecycleBinMediaByIdOriginalParentErrors, GetRecycleBinMediaByIdOriginalParentResponses, GetRecycleBinMediaChildrenData, GetRecycleBinMediaChildrenErrors, GetRecycleBinMediaChildrenResponses, GetRecycleBinMediaReferencedByData, GetRecycleBinMediaReferencedByErrors, GetRecycleBinMediaReferencedByResponses, GetRecycleBinMediaRootData, GetRecycleBinMediaRootErrors, GetRecycleBinMediaRootResponses, GetRecycleBinMediaSiblingsData, GetRecycleBinMediaSiblingsErrors, GetRecycleBinMediaSiblingsResponses, GetRedirectManagementByIdData, GetRedirectManagementByIdErrors, GetRedirectManagementByIdResponses, GetRedirectManagementData, GetRedirectManagementErrors, GetRedirectManagementResponses, GetRedirectManagementStatusData, GetRedirectManagementStatusErrors, GetRedirectManagementStatusResponses, GetRelationByRelationTypeIdData, GetRelationByRelationTypeIdErrors, GetRelationByRelationTypeIdResponses, GetRelationTypeByIdData, GetRelationTypeByIdErrors, GetRelationTypeByIdResponses, GetRelationTypeData, GetRelationTypeErrors, GetRelationTypeResponses, GetScriptByPathData, GetScriptByPathErrors, GetScriptByPathResponses, GetScriptFolderByPathData, GetScriptFolderByPathErrors, GetScriptFolderByPathResponses, GetSearcherBySearcherNameQueryData, GetSearcherBySearcherNameQueryErrors, GetSearcherBySearcherNameQueryResponses, GetSearcherData, GetSearcherErrors, GetSearcherResponses, GetSecurityConfigurationData, GetSecurityConfigurationErrors, GetSecurityConfigurationResponses, GetSegmentData, GetSegmentErrors, GetSegmentResponses, GetServerConfigurationData, GetServerConfigurationResponses, GetServerInformationData, GetServerInformationErrors, GetServerInformationResponses, GetServerStatusData, GetServerStatusErrors, GetServerStatusResponses, GetServerTroubleshootingData, GetServerTroubleshootingErrors, GetServerTroubleshootingResponses, GetServerUpgradeCheckData, GetServerUpgradeCheckErrors, GetServerUpgradeCheckResponses, GetStylesheetByPathData, GetStylesheetByPathErrors, GetStylesheetByPathResponses, GetStylesheetFolderByPathData, GetStylesheetFolderByPathErrors, GetStylesheetFolderByPathResponses, GetTagData, GetTagErrors, GetTagResponses, GetTelemetryData, GetTelemetryErrors, GetTelemetryLevelData, GetTelemetryLevelErrors, GetTelemetryLevelResponses, GetTelemetryResponses, GetTemplateByIdData, GetTemplateByIdErrors, GetTemplateByIdResponses, GetTemplateConfigurationData, GetTemplateConfigurationErrors, GetTemplateConfigurationResponses, GetTemplateQuerySettingsData, GetTemplateQuerySettingsErrors, GetTemplateQuerySettingsResponses, GetTemporaryFileByIdData, GetTemporaryFileByIdErrors, GetTemporaryFileByIdResponses, GetTemporaryFileConfigurationData, GetTemporaryFileConfigurationErrors, GetTemporaryFileConfigurationResponses, GetTreeDataTypeAncestorsData, GetTreeDataTypeAncestorsErrors, GetTreeDataTypeAncestorsResponses, GetTreeDataTypeChildrenData, GetTreeDataTypeChildrenErrors, GetTreeDataTypeChildrenResponses, GetTreeDataTypeRootData, GetTreeDataTypeRootErrors, GetTreeDataTypeRootResponses, GetTreeDataTypeSiblingsData, GetTreeDataTypeSiblingsErrors, GetTreeDataTypeSiblingsResponses, GetTreeDictionaryAncestorsData, GetTreeDictionaryAncestorsErrors, GetTreeDictionaryAncestorsResponses, GetTreeDictionaryChildrenData, GetTreeDictionaryChildrenErrors, GetTreeDictionaryChildrenResponses, GetTreeDictionaryRootData, GetTreeDictionaryRootErrors, GetTreeDictionaryRootResponses, GetTreeDocumentAncestorsData, GetTreeDocumentAncestorsErrors, GetTreeDocumentAncestorsResponses, GetTreeDocumentBlueprintAncestorsData, GetTreeDocumentBlueprintAncestorsErrors, GetTreeDocumentBlueprintAncestorsResponses, GetTreeDocumentBlueprintChildrenData, GetTreeDocumentBlueprintChildrenErrors, GetTreeDocumentBlueprintChildrenResponses, GetTreeDocumentBlueprintRootData, GetTreeDocumentBlueprintRootErrors, GetTreeDocumentBlueprintRootResponses, GetTreeDocumentBlueprintSiblingsData, GetTreeDocumentBlueprintSiblingsErrors, GetTreeDocumentBlueprintSiblingsResponses, GetTreeDocumentChildrenData, GetTreeDocumentChildrenErrors, GetTreeDocumentChildrenResponses, GetTreeDocumentRootData, GetTreeDocumentRootErrors, GetTreeDocumentRootResponses, GetTreeDocumentSiblingsData, GetTreeDocumentSiblingsErrors, GetTreeDocumentSiblingsResponses, GetTreeDocumentTypeAncestorsData, GetTreeDocumentTypeAncestorsErrors, GetTreeDocumentTypeAncestorsResponses, GetTreeDocumentTypeChildrenData, GetTreeDocumentTypeChildrenErrors, GetTreeDocumentTypeChildrenResponses, GetTreeDocumentTypeRootData, GetTreeDocumentTypeRootErrors, GetTreeDocumentTypeRootResponses, GetTreeDocumentTypeSiblingsData, GetTreeDocumentTypeSiblingsErrors, GetTreeDocumentTypeSiblingsResponses, GetTreeMediaAncestorsData, GetTreeMediaAncestorsErrors, GetTreeMediaAncestorsResponses, GetTreeMediaChildrenData, GetTreeMediaChildrenErrors, GetTreeMediaChildrenResponses, GetTreeMediaRootData, GetTreeMediaRootErrors, GetTreeMediaRootResponses, GetTreeMediaSiblingsData, GetTreeMediaSiblingsErrors, GetTreeMediaSiblingsResponses, GetTreeMediaTypeAncestorsData, GetTreeMediaTypeAncestorsErrors, GetTreeMediaTypeAncestorsResponses, GetTreeMediaTypeChildrenData, GetTreeMediaTypeChildrenErrors, GetTreeMediaTypeChildrenResponses, GetTreeMediaTypeRootData, GetTreeMediaTypeRootErrors, GetTreeMediaTypeRootResponses, GetTreeMediaTypeSiblingsData, GetTreeMediaTypeSiblingsErrors, GetTreeMediaTypeSiblingsResponses, GetTreeMemberGroupRootData, GetTreeMemberGroupRootErrors, GetTreeMemberGroupRootResponses, GetTreeMemberTypeRootData, GetTreeMemberTypeRootErrors, GetTreeMemberTypeRootResponses, GetTreeMemberTypeSiblingsData, GetTreeMemberTypeSiblingsErrors, GetTreeMemberTypeSiblingsResponses, GetTreePartialViewAncestorsData, GetTreePartialViewAncestorsErrors, GetTreePartialViewAncestorsResponses, GetTreePartialViewChildrenData, GetTreePartialViewChildrenErrors, GetTreePartialViewChildrenResponses, GetTreePartialViewRootData, GetTreePartialViewRootErrors, GetTreePartialViewRootResponses, GetTreePartialViewSiblingsData, GetTreePartialViewSiblingsErrors, GetTreePartialViewSiblingsResponses, GetTreeScriptAncestorsData, GetTreeScriptAncestorsErrors, GetTreeScriptAncestorsResponses, GetTreeScriptChildrenData, GetTreeScriptChildrenErrors, GetTreeScriptChildrenResponses, GetTreeScriptRootData, GetTreeScriptRootErrors, GetTreeScriptRootResponses, GetTreeScriptSiblingsData, GetTreeScriptSiblingsErrors, GetTreeScriptSiblingsResponses, GetTreeStaticFileAncestorsData, GetTreeStaticFileAncestorsErrors, GetTreeStaticFileAncestorsResponses, GetTreeStaticFileChildrenData, GetTreeStaticFileChildrenErrors, GetTreeStaticFileChildrenResponses, GetTreeStaticFileRootData, GetTreeStaticFileRootErrors, GetTreeStaticFileRootResponses, GetTreeStylesheetAncestorsData, GetTreeStylesheetAncestorsErrors, GetTreeStylesheetAncestorsResponses, GetTreeStylesheetChildrenData, GetTreeStylesheetChildrenErrors, GetTreeStylesheetChildrenResponses, GetTreeStylesheetRootData, GetTreeStylesheetRootErrors, GetTreeStylesheetRootResponses, GetTreeStylesheetSiblingsData, GetTreeStylesheetSiblingsErrors, GetTreeStylesheetSiblingsResponses, GetTreeTemplateAncestorsData, GetTreeTemplateAncestorsErrors, GetTreeTemplateAncestorsResponses, GetTreeTemplateChildrenData, GetTreeTemplateChildrenErrors, GetTreeTemplateChildrenResponses, GetTreeTemplateRootData, GetTreeTemplateRootErrors, GetTreeTemplateRootResponses, GetTreeTemplateSiblingsData, GetTreeTemplateSiblingsErrors, GetTreeTemplateSiblingsResponses, GetUpgradeSettingsData, GetUpgradeSettingsErrors, GetUpgradeSettingsResponses, GetUserById2FaData, GetUserById2FaErrors, GetUserById2FaResponses, GetUserByIdCalculateStartNodesData, GetUserByIdCalculateStartNodesErrors, GetUserByIdCalculateStartNodesResponses, GetUserByIdClientCredentialsData, GetUserByIdClientCredentialsErrors, GetUserByIdClientCredentialsResponses, GetUserByIdData, GetUserByIdErrors, GetUserByIdResponses, GetUserConfigurationData, GetUserConfigurationErrors, GetUserConfigurationResponses, GetUserCurrent2FaByProviderNameData, GetUserCurrent2FaByProviderNameErrors, GetUserCurrent2FaByProviderNameResponses, GetUserCurrent2FaData, GetUserCurrent2FaErrors, GetUserCurrent2FaResponses, GetUserCurrentConfigurationData, GetUserCurrentConfigurationErrors, GetUserCurrentConfigurationResponses, GetUserCurrentData, GetUserCurrentErrors, GetUserCurrentLoginProvidersData, GetUserCurrentLoginProvidersErrors, GetUserCurrentLoginProvidersResponses, GetUserCurrentPermissionsData, GetUserCurrentPermissionsDocumentData, GetUserCurrentPermissionsDocumentErrors, GetUserCurrentPermissionsDocumentResponses, GetUserCurrentPermissionsErrors, GetUserCurrentPermissionsMediaData, GetUserCurrentPermissionsMediaErrors, GetUserCurrentPermissionsMediaResponses, GetUserCurrentPermissionsResponses, GetUserCurrentResponses, GetUserData, GetUserDataByIdData, GetUserDataByIdErrors, GetUserDataByIdResponses, GetUserDataData, GetUserDataErrors, GetUserDataResponses, GetUserErrors, GetUserGroupByIdData, GetUserGroupByIdErrors, GetUserGroupByIdResponses, GetUserGroupData, GetUserGroupErrors, GetUserGroupResponses, GetUserResponses, GetWebhookByIdData, GetWebhookByIdErrors, GetWebhookByIdLogsData, GetWebhookByIdLogsErrors, GetWebhookByIdLogsResponses, GetWebhookByIdResponses, GetWebhookData, GetWebhookErrors, GetWebhookEventsData, GetWebhookEventsErrors, GetWebhookEventsResponses, GetWebhookLogsData, GetWebhookLogsErrors, GetWebhookLogsResponses, GetWebhookResponses, PostDataTypeByIdCopyData, PostDataTypeByIdCopyErrors, PostDataTypeByIdCopyResponses, PostDataTypeData, PostDataTypeErrors, PostDataTypeFolderData, PostDataTypeFolderErrors, PostDataTypeFolderResponses, PostDataTypeResponses, PostDictionaryData, PostDictionaryErrors, PostDictionaryImportData, PostDictionaryImportErrors, PostDictionaryImportResponses, PostDictionaryResponses, PostDocumentBlueprintData, PostDocumentBlueprintErrors, PostDocumentBlueprintFolderData, PostDocumentBlueprintFolderErrors, PostDocumentBlueprintFolderResponses, PostDocumentBlueprintFromDocumentData, PostDocumentBlueprintFromDocumentErrors, PostDocumentBlueprintFromDocumentResponses, PostDocumentBlueprintResponses, PostDocumentByIdCopyData, PostDocumentByIdCopyErrors, PostDocumentByIdCopyResponses, PostDocumentByIdPublicAccessData, PostDocumentByIdPublicAccessErrors, PostDocumentByIdPublicAccessResponses, PostDocumentData, PostDocumentErrors, PostDocumentResponses, PostDocumentTypeAvailableCompositionsData, PostDocumentTypeAvailableCompositionsErrors, PostDocumentTypeAvailableCompositionsResponses, PostDocumentTypeByIdCopyData, PostDocumentTypeByIdCopyErrors, PostDocumentTypeByIdCopyResponses, PostDocumentTypeData, PostDocumentTypeErrors, PostDocumentTypeFolderData, PostDocumentTypeFolderErrors, PostDocumentTypeFolderResponses, PostDocumentTypeImportData, PostDocumentTypeImportErrors, PostDocumentTypeImportResponses, PostDocumentTypeResponses, PostDocumentValidateData, PostDocumentValidateErrors, PostDocumentValidateResponses, PostDocumentVersionByIdRollbackData, PostDocumentVersionByIdRollbackErrors, PostDocumentVersionByIdRollbackResponses, PostDynamicRootQueryData, PostDynamicRootQueryErrors, PostDynamicRootQueryResponses, PostHealthCheckExecuteActionData, PostHealthCheckExecuteActionErrors, PostHealthCheckExecuteActionResponses, PostHealthCheckGroupByNameCheckData, PostHealthCheckGroupByNameCheckErrors, PostHealthCheckGroupByNameCheckResponses, PostIndexerByIndexNameRebuildData, PostIndexerByIndexNameRebuildErrors, PostIndexerByIndexNameRebuildResponses, PostInstallSetupData, PostInstallSetupErrors, PostInstallSetupResponses, PostInstallValidateDatabaseData, PostInstallValidateDatabaseErrors, PostInstallValidateDatabaseResponses, PostLanguageData, PostLanguageErrors, PostLanguageResponses, PostLogViewerSavedSearchData, PostLogViewerSavedSearchErrors, PostLogViewerSavedSearchResponses, PostMediaData, PostMediaErrors, PostMediaResponses, PostMediaTypeAvailableCompositionsData, PostMediaTypeAvailableCompositionsErrors, PostMediaTypeAvailableCompositionsResponses, PostMediaTypeByIdCopyData, PostMediaTypeByIdCopyErrors, PostMediaTypeByIdCopyResponses, PostMediaTypeData, PostMediaTypeErrors, PostMediaTypeFolderData, PostMediaTypeFolderErrors, PostMediaTypeFolderResponses, PostMediaTypeImportData, PostMediaTypeImportErrors, PostMediaTypeImportResponses, PostMediaTypeResponses, PostMediaValidateData, PostMediaValidateErrors, PostMediaValidateResponses, PostMemberData, PostMemberErrors, PostMemberGroupData, PostMemberGroupErrors, PostMemberGroupResponses, PostMemberResponses, PostMemberTypeAvailableCompositionsData, PostMemberTypeAvailableCompositionsErrors, PostMemberTypeAvailableCompositionsResponses, PostMemberTypeByIdCopyData, PostMemberTypeByIdCopyErrors, PostMemberTypeByIdCopyResponses, PostMemberTypeData, PostMemberTypeErrors, PostMemberTypeResponses, PostMemberValidateData, PostMemberValidateErrors, PostMemberValidateResponses, PostModelsBuilderBuildData, PostModelsBuilderBuildErrors, PostModelsBuilderBuildResponses, PostPackageByNameRunMigrationData, PostPackageByNameRunMigrationErrors, PostPackageByNameRunMigrationResponses, PostPackageCreatedData, PostPackageCreatedErrors, PostPackageCreatedResponses, PostPartialViewData, PostPartialViewErrors, PostPartialViewFolderData, PostPartialViewFolderErrors, PostPartialViewFolderResponses, PostPartialViewResponses, PostPreviewData, PostPreviewErrors, PostPreviewResponses, PostPublishedCacheRebuildData, PostPublishedCacheRebuildErrors, PostPublishedCacheRebuildResponses, PostPublishedCacheReloadData, PostPublishedCacheReloadErrors, PostPublishedCacheReloadResponses, PostRedirectManagementStatusData, PostRedirectManagementStatusErrors, PostRedirectManagementStatusResponses, PostScriptData, PostScriptErrors, PostScriptFolderData, PostScriptFolderErrors, PostScriptFolderResponses, PostScriptResponses, PostSecurityForgotPasswordData, PostSecurityForgotPasswordErrors, PostSecurityForgotPasswordResetData, PostSecurityForgotPasswordResetErrors, PostSecurityForgotPasswordResetResponses, PostSecurityForgotPasswordResponses, PostSecurityForgotPasswordVerifyData, PostSecurityForgotPasswordVerifyErrors, PostSecurityForgotPasswordVerifyResponses, PostStylesheetData, PostStylesheetErrors, PostStylesheetFolderData, PostStylesheetFolderErrors, PostStylesheetFolderResponses, PostStylesheetResponses, PostTelemetryLevelData, PostTelemetryLevelErrors, PostTelemetryLevelResponses, PostTemplateData, PostTemplateErrors, PostTemplateQueryExecuteData, PostTemplateQueryExecuteErrors, PostTemplateQueryExecuteResponses, PostTemplateResponses, PostTemporaryFileData, PostTemporaryFileErrors, PostTemporaryFileResponses, PostUpgradeAuthorizeData, PostUpgradeAuthorizeErrors, PostUpgradeAuthorizeResponses, PostUserAvatarByIdData, PostUserAvatarByIdErrors, PostUserAvatarByIdResponses, PostUserByIdChangePasswordData, PostUserByIdChangePasswordErrors, PostUserByIdChangePasswordResponses, PostUserByIdClientCredentialsData, PostUserByIdClientCredentialsErrors, PostUserByIdClientCredentialsResponses, PostUserByIdResetPasswordData, PostUserByIdResetPasswordErrors, PostUserByIdResetPasswordResponses, PostUserCurrent2FaByProviderNameData, PostUserCurrent2FaByProviderNameErrors, PostUserCurrent2FaByProviderNameResponses, PostUserCurrentAvatarData, PostUserCurrentAvatarErrors, PostUserCurrentAvatarResponses, PostUserCurrentChangePasswordData, PostUserCurrentChangePasswordErrors, PostUserCurrentChangePasswordResponses, PostUserData, PostUserDataData, PostUserDataErrors, PostUserDataResponses, PostUserDisableData, PostUserDisableErrors, PostUserDisableResponses, PostUserEnableData, PostUserEnableErrors, PostUserEnableResponses, PostUserErrors, PostUserGroupByIdUsersData, PostUserGroupByIdUsersErrors, PostUserGroupByIdUsersResponses, PostUserGroupData, PostUserGroupErrors, PostUserGroupResponses, PostUserInviteCreatePasswordData, PostUserInviteCreatePasswordErrors, PostUserInviteCreatePasswordResponses, PostUserInviteData, PostUserInviteErrors, PostUserInviteResendData, PostUserInviteResendErrors, PostUserInviteResendResponses, PostUserInviteResponses, PostUserInviteVerifyData, PostUserInviteVerifyErrors, PostUserInviteVerifyResponses, PostUserResponses, PostUserSetUserGroupsData, PostUserSetUserGroupsErrors, PostUserSetUserGroupsResponses, PostUserUnlockData, PostUserUnlockErrors, PostUserUnlockResponses, PostWebhookData, PostWebhookErrors, PostWebhookResponses, PutDataTypeByIdData, PutDataTypeByIdErrors, PutDataTypeByIdMoveData, PutDataTypeByIdMoveErrors, PutDataTypeByIdMoveResponses, PutDataTypeByIdResponses, PutDataTypeFolderByIdData, PutDataTypeFolderByIdErrors, PutDataTypeFolderByIdResponses, PutDictionaryByIdData, PutDictionaryByIdErrors, PutDictionaryByIdMoveData, PutDictionaryByIdMoveErrors, PutDictionaryByIdMoveResponses, PutDictionaryByIdResponses, PutDocumentBlueprintByIdData, PutDocumentBlueprintByIdErrors, PutDocumentBlueprintByIdMoveData, PutDocumentBlueprintByIdMoveErrors, PutDocumentBlueprintByIdMoveResponses, PutDocumentBlueprintByIdResponses, PutDocumentBlueprintFolderByIdData, PutDocumentBlueprintFolderByIdErrors, PutDocumentBlueprintFolderByIdResponses, PutDocumentByIdData, PutDocumentByIdDomainsData, PutDocumentByIdDomainsErrors, PutDocumentByIdDomainsResponses, PutDocumentByIdErrors, PutDocumentByIdMoveData, PutDocumentByIdMoveErrors, PutDocumentByIdMoveResponses, PutDocumentByIdMoveToRecycleBinData, PutDocumentByIdMoveToRecycleBinErrors, PutDocumentByIdMoveToRecycleBinResponses, PutDocumentByIdNotificationsData, PutDocumentByIdNotificationsErrors, PutDocumentByIdNotificationsResponses, PutDocumentByIdPublicAccessData, PutDocumentByIdPublicAccessErrors, PutDocumentByIdPublicAccessResponses, PutDocumentByIdPublishData, PutDocumentByIdPublishErrors, PutDocumentByIdPublishResponses, PutDocumentByIdPublishWithDescendantsData, PutDocumentByIdPublishWithDescendantsErrors, PutDocumentByIdPublishWithDescendantsResponses, PutDocumentByIdResponses, PutDocumentByIdUnpublishData, PutDocumentByIdUnpublishErrors, PutDocumentByIdUnpublishResponses, PutDocumentSortData, PutDocumentSortErrors, PutDocumentSortResponses, PutDocumentTypeByIdData, PutDocumentTypeByIdErrors, PutDocumentTypeByIdImportData, PutDocumentTypeByIdImportErrors, PutDocumentTypeByIdImportResponses, PutDocumentTypeByIdMoveData, PutDocumentTypeByIdMoveErrors, PutDocumentTypeByIdMoveResponses, PutDocumentTypeByIdResponses, PutDocumentTypeFolderByIdData, PutDocumentTypeFolderByIdErrors, PutDocumentTypeFolderByIdResponses, PutDocumentVersionByIdPreventCleanupData, PutDocumentVersionByIdPreventCleanupErrors, PutDocumentVersionByIdPreventCleanupResponses, PutLanguageByIsoCodeData, PutLanguageByIsoCodeErrors, PutLanguageByIsoCodeResponses, PutMediaByIdData, PutMediaByIdErrors, PutMediaByIdMoveData, PutMediaByIdMoveErrors, PutMediaByIdMoveResponses, PutMediaByIdMoveToRecycleBinData, PutMediaByIdMoveToRecycleBinErrors, PutMediaByIdMoveToRecycleBinResponses, PutMediaByIdResponses, PutMediaByIdValidateData, PutMediaByIdValidateErrors, PutMediaByIdValidateResponses, PutMediaSortData, PutMediaSortErrors, PutMediaSortResponses, PutMediaTypeByIdData, PutMediaTypeByIdErrors, PutMediaTypeByIdImportData, PutMediaTypeByIdImportErrors, PutMediaTypeByIdImportResponses, PutMediaTypeByIdMoveData, PutMediaTypeByIdMoveErrors, PutMediaTypeByIdMoveResponses, PutMediaTypeByIdResponses, PutMediaTypeFolderByIdData, PutMediaTypeFolderByIdErrors, PutMediaTypeFolderByIdResponses, PutMemberByIdData, PutMemberByIdErrors, PutMemberByIdResponses, PutMemberByIdValidateData, PutMemberByIdValidateErrors, PutMemberByIdValidateResponses, PutMemberGroupByIdData, PutMemberGroupByIdErrors, PutMemberGroupByIdResponses, PutMemberTypeByIdData, PutMemberTypeByIdErrors, PutMemberTypeByIdResponses, PutPackageCreatedByIdData, PutPackageCreatedByIdErrors, PutPackageCreatedByIdResponses, PutPartialViewByPathData, PutPartialViewByPathErrors, PutPartialViewByPathRenameData, PutPartialViewByPathRenameErrors, PutPartialViewByPathRenameResponses, PutPartialViewByPathResponses, PutProfilingStatusData, PutProfilingStatusErrors, PutProfilingStatusResponses, PutRecycleBinDocumentByIdRestoreData, PutRecycleBinDocumentByIdRestoreErrors, PutRecycleBinDocumentByIdRestoreResponses, PutRecycleBinMediaByIdRestoreData, PutRecycleBinMediaByIdRestoreErrors, PutRecycleBinMediaByIdRestoreResponses, PutScriptByPathData, PutScriptByPathErrors, PutScriptByPathRenameData, PutScriptByPathRenameErrors, PutScriptByPathRenameResponses, PutScriptByPathResponses, PutStylesheetByPathData, PutStylesheetByPathErrors, PutStylesheetByPathRenameData, PutStylesheetByPathRenameErrors, PutStylesheetByPathRenameResponses, PutStylesheetByPathResponses, PutTemplateByIdData, PutTemplateByIdErrors, PutTemplateByIdResponses, PutUmbracoManagementApiV11DocumentByIdValidate11Data, PutUmbracoManagementApiV11DocumentByIdValidate11Errors, PutUmbracoManagementApiV11DocumentByIdValidate11Responses, PutUserByIdData, PutUserByIdErrors, PutUserByIdResponses, PutUserDataData, PutUserDataErrors, PutUserDataResponses, PutUserGroupByIdData, PutUserGroupByIdErrors, PutUserGroupByIdResponses, PutWebhookByIdData, PutWebhookByIdErrors, PutWebhookByIdResponses } from './types.gen'; export type Options = Options2 & { /** @@ -1377,6 +1377,19 @@ export class DocumentService { }); } + public static getDocumentByIdPreviewUrl(options: Options) { + return (options.client ?? client).get({ + security: [ + { + scheme: 'bearer', + type: 'http' + } + ], + url: '/umbraco/management/api/v1/document/{id}/preview-url', + ...options + }); + } + public static deleteDocumentByIdPublicAccess(options: Options) { return (options.client ?? client).delete({ security: [ @@ -3943,6 +3956,9 @@ export class PreviewService { }); } + /** + * @deprecated + */ public static postPreview(options?: Options) { return (options?.client ?? client).post({ security: [ diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/types.gen.ts b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/types.gen.ts index c459c382cdde..97294e9a0bee 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/types.gen.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/backend-api/types.gen.ts @@ -844,7 +844,9 @@ export type DocumentTypeTreeItemResponseModel = { export type DocumentUrlInfoModel = { culture: string | null; - url: string; + url: string | null; + message: string | null; + provider: string; }; export type DocumentUrlInfoResponseModel = { @@ -1370,7 +1372,7 @@ export type MediaTypeTreeItemResponseModel = { export type MediaUrlInfoModel = { culture: string | null; - url: string; + url: string | null; }; export type MediaUrlInfoResponseModel = { @@ -6271,6 +6273,49 @@ export type PutDocumentByIdNotificationsResponses = { 200: unknown; }; +export type GetDocumentByIdPreviewUrlData = { + body?: never; + path: { + id: string; + }; + query?: { + providerAlias?: string; + culture?: string; + segment?: string; + }; + url: '/umbraco/management/api/v1/document/{id}/preview-url'; +}; + +export type GetDocumentByIdPreviewUrlErrors = { + /** + * Bad Request + */ + 400: ProblemDetails; + /** + * The resource is protected and requires an authentication token + */ + 401: unknown; + /** + * The authenticated user does not have access to this resource + */ + 403: unknown; + /** + * Not Found + */ + 404: ProblemDetails; +}; + +export type GetDocumentByIdPreviewUrlError = GetDocumentByIdPreviewUrlErrors[keyof GetDocumentByIdPreviewUrlErrors]; + +export type GetDocumentByIdPreviewUrlResponses = { + /** + * OK + */ + 200: DocumentUrlInfoModel; +}; + +export type GetDocumentByIdPreviewUrlResponse = GetDocumentByIdPreviewUrlResponses[keyof GetDocumentByIdPreviewUrlResponses]; + export type DeleteDocumentByIdPublicAccessData = { body?: never; path: { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/default/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/default/index.ts new file mode 100644 index 000000000000..ef6732912435 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/default/index.ts @@ -0,0 +1 @@ +export * from './workspace-action-menu-item.element.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/default/workspace-action-menu-item.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/default/workspace-action-menu-item.element.ts index f161fbe6711f..a0b3414a1084 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/default/workspace-action-menu-item.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/default/workspace-action-menu-item.element.ts @@ -3,8 +3,8 @@ import type { ManifestWorkspaceActionMenuItemDefaultKind, MetaWorkspaceActionMenuItemDefaultKind, } from '../../../extensions/types.js'; +import { customElement, html, ifDefined, property, state, when } from '@umbraco-cms/backoffice/external/lit'; import { UmbActionExecutedEvent } from '@umbraco-cms/backoffice/event'; -import { html, customElement, property, state, ifDefined, nothing } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import type { UUIMenuItemEvent } from '@umbraco-cms/backoffice/external/uui'; @@ -48,15 +48,11 @@ export class UmbWorkspaceActionMenuItemElement< override render() { return html` - ${this.manifest?.meta.icon - ? html`` - : nothing} + @click=${this.#onClick} + @click-label=${this.#onClickLabel}> + ${when(this.manifest?.meta.icon, (icon) => html``)} `; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/index.ts index 3db891eb25f8..45c48d016926 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu-item/index.ts @@ -1 +1,2 @@ +export * from './default/index.js'; export * from './workspace-action-menu-item-base.controller.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu/workspace-action-menu.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu/workspace-action-menu.element.ts index 93fd02d32609..5335a0423e02 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu/workspace-action-menu.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action-menu/workspace-action-menu.element.ts @@ -29,7 +29,8 @@ export class UmbWorkspaceActionMenuElement extends UmbLitElement { override render() { if (!this.items?.length) return nothing; - return html` - `; + + `; } static override styles = [ diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/index.ts new file mode 100644 index 000000000000..24b7e3dc14be --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/index.ts @@ -0,0 +1 @@ +export * from './workspace-action.element.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/manifests.ts index 8b30dea13f7f..981f71c9138b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/manifests.ts @@ -9,7 +9,7 @@ export const manifest: UmbExtensionManifestKind = { type: 'workspaceAction', kind: 'default', weight: 1000, - element: () => import('./workspace-action-default-kind.element.js'), + element: () => import('./workspace-action.element.js'), meta: { label: '(Missing label in manifest)', }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/workspace-action-default-kind.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/workspace-action.element.ts similarity index 79% rename from src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/workspace-action-default-kind.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/workspace-action.element.ts index 00666645e847..3993951e6e6d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/workspace-action-default-kind.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/workspace-action.element.ts @@ -2,20 +2,18 @@ import type { ManifestWorkspaceAction, ManifestWorkspaceActionMenuItem, MetaWorkspaceActionDefaultKind, + UmbWorkspaceActionArgs, UmbWorkspaceActionDefaultKind, } from '../../../types.js'; +import { customElement, html, property, state, when } from '@umbraco-cms/backoffice/external/lit'; +import { stringOrStringArrayIntersects } from '@umbraco-cms/backoffice/utils'; import { UmbActionExecutedEvent } from '@umbraco-cms/backoffice/event'; -import { html, customElement, property, state, when } from '@umbraco-cms/backoffice/external/lit'; -import type { UUIButtonState } from '@umbraco-cms/backoffice/external/uui'; -import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; -import { - type UmbExtensionElementAndApiInitializer, - UmbExtensionsElementAndApiInitializer, -} from '@umbraco-cms/backoffice/extension-api'; -import { stringOrStringArrayIntersects } from '@umbraco-cms/backoffice/utils'; - -import '../../workspace-action-menu/index.js'; +import { UmbExtensionsElementAndApiInitializer } from '@umbraco-cms/backoffice/extension-api'; +import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; +import type { UmbAction } from '@umbraco-cms/backoffice/action'; +import type { UmbExtensionElementAndApiInitializer } from '@umbraco-cms/backoffice/extension-api'; +import type { UUIButtonState } from '@umbraco-cms/backoffice/external/uui'; @customElement('umb-workspace-action') export class UmbWorkspaceActionElement< @@ -24,7 +22,7 @@ export class UmbWorkspaceActionElement< > extends UmbLitElement { #manifest?: ManifestWorkspaceAction; #api?: ApiType; - #extensionsController?: UmbExtensionsElementAndApiInitializer< + protected _extensionsController?: UmbExtensionsElementAndApiInitializer< ManifestWorkspaceActionMenuItem, 'workspaceActionMenuItem', ManifestWorkspaceActionMenuItem @@ -63,6 +61,10 @@ export class UmbWorkspaceActionElement< return this.#api; } + protected _actionApi?: UmbAction>; + + protected _buttonLabel?: string; + @state() private _buttonState?: UUIButtonState; @@ -76,7 +78,7 @@ export class UmbWorkspaceActionElement< private _isDisabled = false; @state() - private _items: Array> = []; + protected _items: Array> = []; #buttonStateResetTimeoutId: number | null = null; @@ -101,7 +103,7 @@ export class UmbWorkspaceActionElement< } } - this.#observeExtensions(Array.from(aliases)); + this.observeExtensions(Array.from(aliases)); } async #onClick(event: MouseEvent) { @@ -115,8 +117,9 @@ export class UmbWorkspaceActionElement< } try { - if (!this.#api) throw new Error('No api defined'); - await this.#api.execute(); + const api = this._actionApi ?? this.#api; + if (!api) throw new Error('No api defined'); + await api.execute(); this._buttonState = 'success'; this.#initButtonStateReset(); } catch (reason) { @@ -157,9 +160,9 @@ export class UmbWorkspaceActionElement< } } - #observeExtensions(aliases: string[]): void { - this.#extensionsController?.destroy(); - this.#extensionsController = new UmbExtensionsElementAndApiInitializer< + protected observeExtensions(aliases: string[]): void { + this._extensionsController?.destroy(); + this._extensionsController = new UmbExtensionsElementAndApiInitializer< ManifestWorkspaceActionMenuItem, 'workspaceActionMenuItem', ManifestWorkspaceActionMenuItem @@ -167,27 +170,25 @@ export class UmbWorkspaceActionElement< this, umbExtensionsRegistry, 'workspaceActionMenuItem', - ExtensionApiArgsMethod, + (manifest) => [{ meta: manifest.meta }], (action) => stringOrStringArrayIntersects(action.forWorkspaceActions, aliases), - (extensionControllers) => { - this._items = extensionControllers; + (actions) => { + this._items = actions; }, undefined, // We can leave the alias to undefined, as we destroy this our selfs. ); } #renderButton() { - const label = this.#manifest?.meta.label - ? this.localize.string(this.#manifest.meta.label) - : (this.#manifest?.name ?? ''); + const label = this.localize.string(this._buttonLabel || this.#manifest?.meta.label || this.#manifest?.name || ''); return html` `; @@ -196,16 +197,16 @@ export class UmbWorkspaceActionElement< #renderActionMenu() { return html` + color=${this.#manifest?.meta.color ?? 'default'} + look=${this.#manifest?.meta.look ?? 'default'} + .items=${this._items}> `; } override render() { return when( this._items.length, - () => html` ${this.#renderButton()} ${this.#renderActionMenu()} `, + () => html`${this.#renderButton()}${this.#renderActionMenu()}`, () => this.#renderButton(), ); } @@ -223,12 +224,3 @@ declare global { 'umb-workspace-action': UmbWorkspaceActionElement; } } - -/** - * - * @param manifest - * @returns An array of arguments to pass to the extension API initializer. - */ -function ExtensionApiArgsMethod(manifest: ManifestWorkspaceActionMenuItem) { - return [{ meta: manifest.meta }]; -} diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/index.ts b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/index.ts index e2e16c2370ae..fb3b93710842 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/index.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/index.ts @@ -1,2 +1,3 @@ export * from './common/index.js'; +export * from './default/index.js'; export * from './workspace-action-base.controller.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/manifests.ts index 29ec4cf58107..ab1b483f437d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/manifests.ts @@ -7,6 +7,7 @@ import { manifests as itemManifests } from './item/manifests.js'; import { manifests as menuManifests } from './menu/manifests.js'; import { manifests as modalManifests } from './modals/manifests.js'; import { manifests as pickerManifests } from './picker/manifests.js'; +import { manifests as previewManifests } from './preview/manifests.js'; import { manifests as propertyEditorManifests } from './property-editors/manifests.js'; import { manifests as publishingManifests } from './publishing/manifests.js'; import { manifests as recycleBinManifests } from './recycle-bin/manifests.js'; @@ -31,6 +32,7 @@ export const manifests: Array = ...menuManifests, ...modalManifests, ...pickerManifests, + ...previewManifests, ...propertyEditorManifests, ...publishingManifests, ...recycleBinManifests, diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/manifests.ts new file mode 100644 index 000000000000..a3765d6b90d7 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/manifests.ts @@ -0,0 +1,8 @@ +import { manifests as previewOptionManifests } from './workspace-action-menu-item/manifests.js'; +import { manifests as workspaceActionManifests } from './workspace-action/manifests.js'; +import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry'; + +export const manifests: Array = [ + ...previewOptionManifests, + ...workspaceActionManifests, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/types.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/types.ts new file mode 100644 index 000000000000..7f71e8a9a21a --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/types.ts @@ -0,0 +1 @@ +export type * from './workspace-action-menu-item/types.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/manifests.ts new file mode 100644 index 000000000000..86ae748f5a97 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/manifests.ts @@ -0,0 +1,20 @@ +import { manifest as workspaceActionItemKind } from './preview-option.workspace-action-item.kind.js'; +import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry'; + +const saveAndPreview: UmbExtensionManifest = { + type: 'workspaceActionMenuItem', + kind: 'previewOption', + alias: 'Umb.Document.WorkspaceActionMenuItem.SaveAndPreview', + name: 'Save And Preview Document Preview Option', + forWorkspaceActions: 'Umb.WorkspaceAction.Document.SaveAndPreview', + weight: 100, + meta: { + label: '#buttons_saveAndPreview', + urlProviderAlias: 'umbDocumentUrlProvider', + }, +}; + +export const manifests: Array = [ + saveAndPreview, + workspaceActionItemKind, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/preview-option.action.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/preview-option.action.ts new file mode 100644 index 000000000000..6cd3ac352a05 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/preview-option.action.ts @@ -0,0 +1,17 @@ +import { UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../../workspace/document-workspace.context-token.js'; +import type { ManifestWorkspaceActionMenuItemPreviewOptionKind } from './preview-option.workspace-action-menu-item.extension.js'; +import { UmbWorkspaceActionBase } from '@umbraco-cms/backoffice/workspace'; + +export class UmbDocumentSaveAndPreviewWorkspaceAction extends UmbWorkspaceActionBase { + manifest?: ManifestWorkspaceActionMenuItemPreviewOptionKind; + + override async execute() { + const workspaceContext = await this.getContext(UMB_DOCUMENT_WORKSPACE_CONTEXT); + if (!workspaceContext) { + throw new Error('The workspace context is missing'); + } + await workspaceContext?.saveAndPreview(this.manifest?.meta.urlProviderAlias); + } +} + +export { UmbDocumentSaveAndPreviewWorkspaceAction as api }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/preview-option.workspace-action-item.kind.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/preview-option.workspace-action-item.kind.ts new file mode 100644 index 000000000000..627d24e2c2f0 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/preview-option.workspace-action-item.kind.ts @@ -0,0 +1,21 @@ +import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry'; + +export const manifest: UmbExtensionManifestKind = { + type: 'kind', + alias: 'Umb.Kind.WorkspaceActionMenuItem.PreviewOption', + matchType: 'workspaceActionMenuItem', + matchKind: 'previewOption', + manifest: { + type: 'workspaceActionMenuItem', + kind: 'previewOption', + weight: 1000, + api: () => import('./preview-option.action.js'), + elementName: 'umb-workspace-action-menu-item', + forWorkspaceActions: 'Umb.WorkspaceAction.Document.SaveAndPreview', + meta: { + icon: '', + label: '(Missing label in manifest)', + urlProviderAlias: 'umbDocumentUrlProvider', + }, + }, +}; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/preview-option.workspace-action-menu-item.extension.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/preview-option.workspace-action-menu-item.extension.ts new file mode 100644 index 000000000000..07b0add676c4 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/preview-option.workspace-action-menu-item.extension.ts @@ -0,0 +1,20 @@ +import type { + ManifestWorkspaceActionMenuItem, + MetaWorkspaceActionMenuItemDefaultKind, +} from '@umbraco-cms/backoffice/workspace'; + +export interface ManifestWorkspaceActionMenuItemPreviewOptionKind + extends ManifestWorkspaceActionMenuItem { + type: 'workspaceActionMenuItem'; + kind: 'previewOption'; +} + +export interface MetaWorkspaceActionMenuItemPreviewOptionKind extends MetaWorkspaceActionMenuItemDefaultKind { + urlProviderAlias: string; +} + +declare global { + interface UmbExtensionManifestMap { + umbWorkspaceActionMenuItemPreviewOptionKind: ManifestWorkspaceActionMenuItemPreviewOptionKind; + } +} diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/types.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/types.ts new file mode 100644 index 000000000000..219d8c6bbc0c --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action-menu-item/types.ts @@ -0,0 +1 @@ +export type * from './preview-option.workspace-action-menu-item.extension.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action/manifests.ts new file mode 100644 index 000000000000..93d854cb79f9 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action/manifests.ts @@ -0,0 +1,27 @@ +import { UMB_DOCUMENT_WORKSPACE_ALIAS } from '../../constants.js'; +import { UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS } from '@umbraco-cms/backoffice/recycle-bin'; +import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace'; + +const workspaceAction: UmbExtensionManifest = { + type: 'workspaceAction', + kind: 'default', + alias: 'Umb.WorkspaceAction.Document.SaveAndPreview', + name: 'Save And Preview Document Workspace Action', + weight: 90, + api: () => import('./save-and-preview.action.js'), + element: () => import('./save-and-preview-workspace-action.element.js'), + meta: { + label: '#buttons_saveAndPreview', + }, + conditions: [ + { + alias: UMB_WORKSPACE_CONDITION_ALIAS, + match: UMB_DOCUMENT_WORKSPACE_ALIAS, + }, + { + alias: UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS, + }, + ], +}; + +export const manifests: Array = [workspaceAction]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action/save-and-preview-workspace-action.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action/save-and-preview-workspace-action.element.ts new file mode 100644 index 000000000000..ad7c9534e740 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action/save-and-preview-workspace-action.element.ts @@ -0,0 +1,47 @@ +import { customElement } from '@umbraco-cms/backoffice/external/lit'; +import { createExtensionApi, UmbExtensionsElementAndApiInitializer } from '@umbraco-cms/backoffice/extension-api'; +import { stringOrStringArrayIntersects } from '@umbraco-cms/backoffice/utils'; +import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; +import { UmbWorkspaceActionElement } from '@umbraco-cms/backoffice/workspace'; +import type { ManifestWorkspaceActionMenuItem } from '@umbraco-cms/backoffice/workspace'; + +@customElement('umb-save-and-preview-workspace-action') +export class UmbSaveAndPreviewWorkspaceActionElement extends UmbWorkspaceActionElement { + override observeExtensions(aliases: string[]) { + this._extensionsController?.destroy(); + this._extensionsController = new UmbExtensionsElementAndApiInitializer< + ManifestWorkspaceActionMenuItem, + 'workspaceActionMenuItem', + ManifestWorkspaceActionMenuItem + >( + this, + umbExtensionsRegistry, + 'workspaceActionMenuItem', + (manifest) => [{ meta: manifest.meta }], + (action) => stringOrStringArrayIntersects(action.forWorkspaceActions, aliases), + async (actions) => { + const firstAction = actions.shift(); + + if (firstAction) { + this._buttonLabel = (firstAction.manifest.meta as any).label; + const api = await createExtensionApi(this, firstAction.manifest, []); + if (api) { + (api as any).manifest = firstAction.manifest; + this._actionApi = api; + } + } + + this._items = actions; + }, + undefined, // We can leave the alias to undefined, as we destroy this our selfs. + ); + } +} + +export default UmbSaveAndPreviewWorkspaceActionElement; + +declare global { + interface HTMLElementTagNameMap { + 'umb-save-and-preview-workspace-action': UmbSaveAndPreviewWorkspaceActionElement; + } +} diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/save-and-preview.action.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action/save-and-preview.action.ts similarity index 62% rename from src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/save-and-preview.action.ts rename to src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action/save-and-preview.action.ts index 6f0e3a783a04..e622c57bf675 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/save-and-preview.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/preview/workspace-action/save-and-preview.action.ts @@ -1,13 +1,8 @@ import { UmbDocumentUserPermissionCondition } from '../../user-permissions/document/conditions/document-user-permission.condition.js'; -import { UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../document-workspace.context-token.js'; import { UMB_USER_PERMISSION_DOCUMENT_UPDATE } from '../../user-permissions/document/constants.js'; import { UmbWorkspaceActionBase } from '@umbraco-cms/backoffice/workspace'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -// TODO: Investigate how additional preview environments can be supported. [LK:2024-05-16] -// https://docs.umbraco.com/umbraco-cms/reference/content-delivery-api/additional-preview-environments-support -// In v13, they are registered on the server using `SendingContentNotification`, which is no longer available in v14. - export class UmbDocumentSaveAndPreviewWorkspaceAction extends UmbWorkspaceActionBase { constructor(host: UmbControllerHost, args: any) { super(host, args); @@ -31,14 +26,6 @@ export class UmbDocumentSaveAndPreviewWorkspaceAction extends UmbWorkspaceAction }, }); } - - override async execute() { - const workspaceContext = await this.getContext(UMB_DOCUMENT_WORKSPACE_CONTEXT); - if (!workspaceContext) { - throw new Error('Document workspace context not found'); - } - workspaceContext.saveAndPreview(); - } } export { UmbDocumentSaveAndPreviewWorkspaceAction as api }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/preview/document-preview.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/preview/document-preview.repository.ts index 3b4319e2437b..d216290d3997 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/preview/document-preview.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/preview/document-preview.repository.ts @@ -1,19 +1,57 @@ -import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository'; -import { PreviewService } from '@umbraco-cms/backoffice/external/backend-api'; import { tryExecute } from '@umbraco-cms/backoffice/resources'; +import { DocumentService, PreviewService } from '@umbraco-cms/backoffice/external/backend-api'; +import { UmbDeprecation } from '@umbraco-cms/backoffice/utils'; +import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository'; +import type { DocumentUrlInfoModel } from '@umbraco-cms/backoffice/external/backend-api'; +import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; export class UmbDocumentPreviewRepository extends UmbRepositoryBase { constructor(host: UmbControllerHost) { super(host); } + /** + * Gets the preview URL for a document. + * @param {string} unique The unique identifier of the document. + * @param {string} providerAlias The alias of the URL provider registered on the server. + * @param {string | undefined} culture The culture to preview (undefined means invariant). + * @param {string | undefined} segment The segment to preview (undefined means no specific segment). + * @returns {DocumentUrlInfoModel} The preview URLs of the document. + */ + async getPreviewUrl( + unique: string, + providerAlias: string, + culture?: string, + segment?: string, + ): Promise { + const { data, error } = await tryExecute( + this, + DocumentService.getDocumentByIdPreviewUrl({ + path: { id: unique }, + query: { providerAlias, culture, segment }, + }), + ); + + if (error) { + throw new Error(error.message); + } + + return data; + } + /** * Enters preview mode. * @returns {Promise} * @memberof UmbDocumentPreviewRepository + * @deprecated Replaced with the Document Preview URLs feature. This will be removed in v19. [LK] */ async enter(): Promise { + new UmbDeprecation({ + removeInVersion: '19.0.0', + deprecated: '`UmbDocumentPreviewRepository.enter()`', + solution: 'Use `UmbDocumentPreviewRepository.getPreviewUrl()` instead', + }).warn(); + await tryExecute(this, PreviewService.postPreview(), { disableNotifications: true }); return; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/types.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/types.ts index 1e7a6912b320..6ac1773e536b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/types.ts @@ -14,6 +14,7 @@ export type * from './collection/types.js'; export type * from './entity.js'; export type * from './item/types.js'; export type * from './modals/types.js'; +export type * from './preview/types.js'; export type * from './publishing/types.js'; export type * from './recycle-bin/types.js'; export type * from './repository/types.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts index 8891d6b6c1f8..89df34cac81c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/url/repository/document-url.server.data-source.ts @@ -38,4 +38,7 @@ export class UmbDocumentUrlServerDataSource extends UmbItemServerDataSourceBase< } } -const mapper = (item: DocumentUrlInfoResponseModel): UmbDocumentUrlsModel => ({ unique: item.id, urls: item.urlInfos }); +const mapper = (item: DocumentUrlInfoResponseModel): UmbDocumentUrlsModel => ({ + unique: item.id, + urls: item.urlInfos.map((urlInfo) => ({ culture: urlInfo.culture, url: urlInfo.url ?? undefined })), +}); diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/manifests.ts index 291ff6174555..3112f8ad2093 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/actions/manifests.ts @@ -25,24 +25,4 @@ export const manifests: Array = [ }, ], }, - { - type: 'workspaceAction', - kind: 'default', - alias: 'Umb.WorkspaceAction.Document.SaveAndPreview', - name: 'Save And Preview Document Workspace Action', - weight: 90, - api: () => import('./save-and-preview.action.js'), - meta: { - label: '#buttons_saveAndPreview', - }, - conditions: [ - { - alias: UMB_WORKSPACE_CONDITION_ALIAS, - match: UMB_DOCUMENT_WORKSPACE_ALIAS, - }, - { - alias: UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS, - }, - ], - }, ]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts index e8af9ec52ec5..449a8577a3b8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts @@ -19,8 +19,8 @@ import { UmbDocumentValidationRepository } from '../repository/validation/index. import { UMB_DOCUMENT_CONFIGURATION_CONTEXT } from '../index.js'; import { UMB_DOCUMENT_DETAIL_MODEL_VARIANT_SCAFFOLD, UMB_DOCUMENT_WORKSPACE_ALIAS } from './constants.js'; import { createExtensionApiByAlias } from '@umbraco-cms/backoffice/extension-registry'; -import { ensurePathEndsWithSlash } from '@umbraco-cms/backoffice/utils'; import { observeMultiple } from '@umbraco-cms/backoffice/observable-api'; +import { umbPeekError } from '@umbraco-cms/backoffice/notification'; import { UmbContentDetailWorkspaceContextBase } from '@umbraco-cms/backoffice/content'; import { UmbDocumentBlueprintDetailRepository } from '@umbraco-cms/backoffice/document-blueprint'; import { UmbIsTrashedEntityContext } from '@umbraco-cms/backoffice/recycle-bin'; @@ -29,7 +29,6 @@ import { UmbWorkspaceIsNewRedirectController, UmbWorkspaceIsNewRedirectControllerAlias, } from '@umbraco-cms/backoffice/workspace'; -import { UMB_SERVER_CONTEXT } from '@umbraco-cms/backoffice/server'; import type { UmbContentWorkspaceContext } from '@umbraco-cms/backoffice/content'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import type { UmbDocumentTypeDetailModel } from '@umbraco-cms/backoffice/document-type'; @@ -299,11 +298,13 @@ export class UmbDocumentWorkspaceContext await super._handleSave(); } - public async saveAndPreview(): Promise { - return await this.#handleSaveAndPreview(); + public async saveAndPreview(urlProviderAlias?: string): Promise { + return await this.#handleSaveAndPreview(urlProviderAlias ?? 'umbDocumentUrlProvider'); } - async #handleSaveAndPreview() { + async #handleSaveAndPreview(urlProviderAlias: string) { + if (!urlProviderAlias) throw new Error('Url provider alias is missing'); + const unique = this.getUnique(); if (!unique) throw new Error('Unique is missing'); @@ -319,28 +320,25 @@ export class UmbDocumentWorkspaceContext await this.performCreateOrUpdate(variantIds, saveData); } - // Tell the server that we're entering preview mode. - await new UmbDocumentPreviewRepository(this).enter(); - - const serverContext = await this.getContext(UMB_SERVER_CONTEXT); - if (!serverContext) { - throw new Error('Server context is missing'); - } - - const backofficePath = serverContext.getBackofficePath(); - const previewUrl = new URL(ensurePathEndsWithSlash(backofficePath) + 'preview', window.location.origin); - previewUrl.searchParams.set('id', unique); + // Get the preview URL from the server. + const previewRepository = new UmbDocumentPreviewRepository(this); + const previewUrlData = await previewRepository.getPreviewUrl( + unique, + urlProviderAlias, + firstVariantId.culture ?? undefined, + firstVariantId.segment ?? undefined, + ); - if (firstVariantId.culture) { - previewUrl.searchParams.set('culture', firstVariantId.culture); + if (previewUrlData.url) { + const previewWindow = window.open(previewUrlData.url, `umbpreview-${unique}`); + previewWindow?.focus(); + return; } - if (firstVariantId.segment) { - previewUrl.searchParams.set('segment', firstVariantId.segment); + if (previewUrlData.message) { + umbPeekError(this._host, { color: 'danger', headline: 'Preview error', message: previewUrlData.message }); + throw new Error(previewUrlData.message); } - - const previewWindow = window.open(previewUrl.toString(), `umbpreview-${unique}`); - previewWindow?.focus(); } public createPropertyDatasetContext( diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/imaging/imaging.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/media/imaging/imaging.server.data.ts index 924ffc1a2448..90b38f3537d6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/imaging/imaging.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/imaging/imaging.server.data.ts @@ -45,7 +45,7 @@ export class UmbImagingServerDataSource { } #mapper(item: MediaUrlInfoResponseModel): UmbMediaUrlModel { - const url = item.urlInfos[0]?.url; + const url = item.urlInfos[0]?.url ?? undefined; return { unique: item.id, url: url, diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts index 24571d50d344..70b3aa71f7bc 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/url/repository/media-url.server.data-source.ts @@ -40,7 +40,7 @@ export class UmbMediaUrlServerDataSource extends UmbItemServerDataSourceBase< } const mapper = (item: MediaUrlInfoResponseModel): UmbMediaUrlModel => { - const url = item.urlInfos.length ? item.urlInfos[0].url : undefined; + const url = item.urlInfos.length ? (item.urlInfos[0].url ?? undefined) : undefined; const extension = url ? url.slice(url.lastIndexOf('.') + 1, url.length) : undefined; return { diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/PublishedUrlInfoProviderTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/PublishedUrlInfoProviderTests.cs index f1cf6573cb97..3bb768fec3b7 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/PublishedUrlInfoProviderTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/PublishedUrlInfoProviderTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using Umbraco.Cms.Core; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Tests.Common.Builders; @@ -29,13 +30,15 @@ public async Task Two_items_in_level_1_with_same_name_will_have_conflicting_rout // Assert the url of subpage is correct Assert.AreEqual(1, subPageUrls.Count); - Assert.IsTrue(subPageUrls.First().IsUrl); - Assert.AreEqual("/text-page-1/", subPageUrls.First().Text); + Assert.IsNotNull(subPageUrls.First().Url); + Assert.AreEqual("/text-page-1/", subPageUrls.First().Url!.ToString()); + Assert.AreEqual(Constants.UrlProviders.Content, subPageUrls.First().Provider); Assert.AreEqual(Subpage.Key, DocumentUrlService.GetDocumentKeyByRoute("/text-page-1/", "en-US", null, false)); // Assert the url of child of second root is not exposed Assert.AreEqual(1, childOfSecondRootUrls.Count); - Assert.IsFalse(childOfSecondRootUrls.First().IsUrl); + Assert.IsNull(childOfSecondRootUrls.First().Url); + Assert.AreEqual(Constants.UrlProviders.Content, childOfSecondRootUrls.First().Provider); // Ensure the url without hide top level is not finding the child of second root Assert.AreNotEqual(childOfSecondRoot.Key, DocumentUrlService.GetDocumentKeyByRoute("/second-root/text-page-1/", "en-US", null, false)); diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/PublishedUrlInfoProvider_hidetoplevel_false.cs b/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/PublishedUrlInfoProvider_hidetoplevel_false.cs index 9503e4c80afc..d3040fa55b93 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/PublishedUrlInfoProvider_hidetoplevel_false.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Core/Services/PublishedUrlInfoProvider_hidetoplevel_false.cs @@ -1,5 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using NUnit.Framework; +using Umbraco.Cms.Core; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Models; using Umbraco.Cms.Tests.Common.Builders; @@ -35,11 +36,13 @@ public async Task Two_items_in_level_1_with_same_name_will_not_have_conflicting_ var childOfSecondRootUrls = await PublishedUrlInfoProvider.GetAllAsync(childOfSecondRoot); Assert.AreEqual(1, subPageUrls.Count); - Assert.IsTrue(subPageUrls.First().IsUrl); - Assert.AreEqual("/textpage/text-page-1/", subPageUrls.First().Text); + Assert.IsNotNull(subPageUrls.First().Url); + Assert.AreEqual("/textpage/text-page-1/", subPageUrls.First().Url!.ToString()); + Assert.AreEqual(Constants.UrlProviders.Content, subPageUrls.First().Provider); Assert.AreEqual(1, childOfSecondRootUrls.Count); - Assert.IsTrue(childOfSecondRootUrls.First().IsUrl); - Assert.AreEqual("/second-root/text-page-1/", childOfSecondRootUrls.First().Text); + Assert.IsNotNull(childOfSecondRootUrls.First().Url); + Assert.AreEqual("/second-root/text-page-1/", childOfSecondRootUrls.First().Url!.ToString()); + Assert.AreEqual(Constants.UrlProviders.Content, childOfSecondRootUrls.First().Provider); } } diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/UrlAndDomains/DomainAndUrlsTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/UrlAndDomains/DomainAndUrlsTests.cs index 97613323d14d..09c8aa605cc4 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/UrlAndDomains/DomainAndUrlsTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Web.BackOffice/UrlAndDomains/DomainAndUrlsTests.cs @@ -233,8 +233,8 @@ public async Task Can_Resolve_Urls_With_Domains_For_All_Cultures() foreach (var culture in Cultures) { var domain = GetDomainUrlFromCultureCode(culture); - Assert.IsTrue(rootUrls.Any(x => x.Text == domain)); - Assert.IsTrue(rootUrls.Any(x => x.Text == "https://localhost" + domain)); + Assert.IsTrue(rootUrls.Any(x => x.Url?.ToString() == domain && x.Message == null)); + Assert.IsTrue(rootUrls.Any(x => x.Url?.ToString() == "https://localhost" + domain && x.Message == null)); } }); } @@ -263,14 +263,14 @@ public async Task Can_Resolve_Urls_For_Non_Default_Domain_Culture_Only() Assert.AreEqual(4, rootUrls.Count()); //We expect two for the domain that is setup - Assert.IsTrue(rootUrls.Any(x => x.IsUrl && x.Text == domain && x.Culture == culture)); - Assert.IsTrue(rootUrls.Any(x => x.IsUrl && x.Text == "https://localhost" + domain && x.Culture == culture)); + Assert.IsTrue(rootUrls.Any(x => x.Url?.ToString() == domain && x.Culture == culture && x.Message == null)); + Assert.IsTrue(rootUrls.Any(x => x.Url?.ToString() == "https://localhost" + domain && x.Culture == culture && x.Message == null)); //We expect the default language to be routable on the default path "/" - Assert.IsTrue(rootUrls.Any(x => x.IsUrl && x.Text == "/" && x.Culture == Cultures[0])); + Assert.IsTrue(rootUrls.Any(x => x.Url?.ToString() == "/" && x.Culture == Cultures[0] && x.Message == null)); //We dont expect non-default languages without a domain to be routable - Assert.IsTrue(rootUrls.Any(x => x.IsUrl == false && x.Culture == Cultures[2])); + Assert.IsTrue(rootUrls.Any(x => x.Url == null && x.Culture == Cultures[2])); }); } diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Templates/HtmlImageSourceParserTests.cs b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Templates/HtmlImageSourceParserTests.cs index 3a7caf1f6abb..2da88215b83b 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Templates/HtmlImageSourceParserTests.cs +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Templates/HtmlImageSourceParserTests.cs @@ -98,7 +98,7 @@ public void Ensure_Image_Sources() It.IsAny(), It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/media/1001/my-image.jpg")); + .Returns(UrlInfo.AsUrl("/media/1001/my-image.jpg", "Test Provider")); var umbracoContextAccessor = new TestUmbracoContextAccessor(); diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Templates/HtmlLocalLinkParserTests.cs b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Templates/HtmlLocalLinkParserTests.cs index 0aa00b48d671..b2123593165d 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Templates/HtmlLocalLinkParserTests.cs +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/Templates/HtmlLocalLinkParserTests.cs @@ -183,7 +183,7 @@ public void ParseLocalLinks(string input, string result) It.IsAny(), It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/my-test-url")); + .Returns(UrlInfo.AsUrl("/my-test-url", "Test Provider")); var contentType = new PublishedContentType( Guid.NewGuid(), 666, @@ -213,7 +213,7 @@ public void ParseLocalLinks(string input, string result) It.IsAny(), It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/media/1001/my-image.jpg")); + .Returns(UrlInfo.AsUrl("/media/1001/my-image.jpg", "Test Provider")); var umbracoContextAccessor = new TestUmbracoContextAccessor(); @@ -257,14 +257,14 @@ public void ParseLocalLinks_WithUrlMode_RespectsUrlMode() UrlMode.Relative, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/relative-url")); + .Returns(UrlInfo.AsUrl("/relative-url", "Test Provider")); contentUrlProvider .Setup(x => x.GetUrl( It.IsAny(), UrlMode.Absolute, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("http://example.com/absolute-url")); + .Returns(UrlInfo.AsUrl("http://example.com/absolute-url", "Test Provider")); var contentType = new PublishedContentType( Guid.NewGuid(), @@ -328,28 +328,28 @@ public void ParseLocalLinks_WithVariousUrlModes_ReturnsCorrectUrls(UrlMode urlMo UrlMode.Default, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/relative-url")); + .Returns(UrlInfo.AsUrl("/relative-url", "Test Provider")); contentUrlProvider .Setup(x => x.GetUrl( It.IsAny(), UrlMode.Relative, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/relative-url")); + .Returns(UrlInfo.AsUrl("/relative-url", "Test Provider")); contentUrlProvider .Setup(x => x.GetUrl( It.IsAny(), UrlMode.Absolute, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("https://example.com/absolute-url")); + .Returns(UrlInfo.AsUrl("https://example.com/absolute-url", "Test Provider")); contentUrlProvider .Setup(x => x.GetUrl( It.IsAny(), UrlMode.Auto, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/relative-url")); + .Returns(UrlInfo.AsUrl("/relative-url", "Test Provider")); var contentType = new PublishedContentType( Guid.NewGuid(), @@ -371,28 +371,28 @@ public void ParseLocalLinks_WithVariousUrlModes_ReturnsCorrectUrls(UrlMode urlMo UrlMode.Default, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/media/relative/image.jpg")); + .Returns(UrlInfo.AsUrl("/media/relative/image.jpg", "Test Provider")); mediaUrlProvider.Setup(x => x.GetMediaUrl( It.IsAny(), It.IsAny(), UrlMode.Relative, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/media/relative/image.jpg")); + .Returns(UrlInfo.AsUrl("/media/relative/image.jpg", "Test Provider")); mediaUrlProvider.Setup(x => x.GetMediaUrl( It.IsAny(), It.IsAny(), UrlMode.Absolute, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("https://example.com/media/absolute/image.jpg")); + .Returns(UrlInfo.AsUrl("https://example.com/media/absolute/image.jpg", "Test Provider")); mediaUrlProvider.Setup(x => x.GetMediaUrl( It.IsAny(), It.IsAny(), UrlMode.Auto, It.IsAny(), It.IsAny())) - .Returns(UrlInfo.Url("/media/relative/image.jpg")); + .Returns(UrlInfo.AsUrl("/media/relative/image.jpg", "Test Provider")); var mediaType = new PublishedContentType( Guid.NewGuid(),