* add a more generic UIHandler to customize how inputAttributes can be handle by the ui * Add IPropertyUIHandlerResolver and update PropertyUIHandlerResolver Introduced a new interface, IPropertyUIHandlerResolver, to resolve UI options for a property. Refactored PropertyUIHandlerResolver to implement this interface and removed the unnecessary partial class structure. Also, cleaned up some unnecessary usings in various files for better code organization. * Refactor variable name and description in InputDescriptor The 'uISpecifications' variable in the InputDescriptor model is renamed to 'uiSpecifications' for better readability. Additionally, the associated comment was revised to explain that the dictionary is used by the UI. * "Refactor codebase for improved organization and cleaner architecture" The codebase has been significantly refactored, moving several classes to more appropriate namespaces for improved organization and cleaner architecture. This includes shifting UI hint handlers, activities, and memory-related components, amongst others. The changes should improve code readability and maintainability, but as this is a broad refactoring effort, thorough regression testing is advised. * Add CheckList UIHint with associated handler and provider This update introduces a new UIHint called CheckList to the Elsa.Workflows.Core. This includes the necessary handler and provider classes. The handler is registered in the WorkflowsFeature.cs, and the CheckList UIHint key has been added to the InputUIHints.cs. Various associated files have been created in both the Elsa.Api.Client and Elsa.Workflows.Core project to support this new UIHint. --------- Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com> Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
72 lines
2.1 KiB
C#
72 lines
2.1 KiB
C#
using System.Text.Json.Serialization;
|
|
using Elsa.Workflows.Attributes;
|
|
|
|
namespace Elsa.Http.Bookmarks;
|
|
|
|
/// <summary>
|
|
/// A bookmark used by the <see cref="HttpEndpoint"/> activity.
|
|
/// </summary>
|
|
public record HttpEndpointBookmarkPayload
|
|
{
|
|
private readonly string _path = default!;
|
|
private readonly string _method = default!;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="HttpEndpointBookmarkPayload"/> class.
|
|
/// </summary>
|
|
[JsonConstructor]
|
|
public HttpEndpointBookmarkPayload()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="HttpEndpointBookmarkPayload"/> class.
|
|
/// </summary>
|
|
public HttpEndpointBookmarkPayload(string path, string method, bool? authorize = default, string? policy = default, TimeSpan? requestTimeout = default, long? requestSizeLimit = default)
|
|
{
|
|
Path = path;
|
|
Method = method;
|
|
Authorize = authorize;
|
|
Policy = policy;
|
|
RequestTimeout = requestTimeout;
|
|
RequestSizeLimit = requestSizeLimit;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the path of the HTTP endpoint.
|
|
/// </summary>
|
|
public string Path
|
|
{
|
|
get => _path;
|
|
init => _path = value.ToLowerInvariant();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the HTTP method of the endpoint.
|
|
/// </summary>
|
|
public string Method
|
|
{
|
|
get => _method;
|
|
init => _method = value.ToLowerInvariant();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the policy to use for authorization.
|
|
/// </summary>
|
|
[ExcludeFromHash] public string? Policy { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether the endpoint requires authorization.
|
|
/// </summary>
|
|
[ExcludeFromHash] public bool? Authorize { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the request timeout.
|
|
/// </summary>
|
|
[ExcludeFromHash] public TimeSpan? RequestTimeout { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the max request size in bytes.
|
|
/// </summary>
|
|
[ExcludeFromHash] public long? RequestSizeLimit { get; set; }
|
|
} |