| | | 1 | | using Elsa.Authorization; |
| | | 2 | | using Elsa.Workflows.Management.Filters; |
| | | 3 | | |
| | | 4 | | namespace Elsa.Workflows.Management; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Applies an optional workflow definition filter that is provided by another module. A provider should leave an omitte |
| | | 8 | | /// </summary> |
| | | 9 | | public interface IWorkflowDefinitionFilterProvider |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// Gets a value indicating whether this provider can apply criteria to the specified filter. |
| | | 13 | | /// </summary> |
| | | 14 | | /// <param name="filter">The filter to inspect.</param> |
| | | 15 | | bool CanApply(WorkflowDefinitionFilter filter); |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// Gets the permissions required before this provider can inspect data for the specified filter. |
| | | 19 | | /// </summary> |
| | | 20 | | /// <param name="filter">The filter to inspect.</param> |
| | 0 | 21 | | IEnumerable<Permission> GetRequiredPermissions(WorkflowDefinitionFilter filter) => []; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Applies the provider's criteria to the specified filter. |
| | | 25 | | /// </summary> |
| | | 26 | | /// <remarks>Criteria that remain non-empty after all providers have run are reported as unsupported by the API.</re |
| | | 27 | | /// <param name="filter">The filter to update.</param> |
| | | 28 | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | 29 | | Task ApplyAsync(WorkflowDefinitionFilter filter, CancellationToken cancellationToken = default); |
| | | 30 | | } |