| | | 1 | | using Elsa.Workflows.Api.Models; |
| | | 2 | | using FastEndpoints; |
| | | 3 | | |
| | | 4 | | // ReSharper disable NotAccessedPositionalProperty.Global |
| | | 5 | | |
| | | 6 | | namespace Elsa.Workflows.Api.Endpoints.WorkflowInstances.Journal.FilteredList; |
| | | 7 | | |
| | | 8 | | /// <summary> |
| | | 9 | | /// Represents a request for a page of workflow execution log records. |
| | | 10 | | /// </summary> |
| | | 11 | | internal class Request |
| | | 12 | | { |
| | | 13 | | /// <summary> |
| | | 14 | | /// The ID of the workflow instance to get the execution log for. |
| | | 15 | | /// </summary> |
| | 0 | 16 | | [BindFrom("id")] public string WorkflowInstanceId { get; set; } = default!; |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// The filter to apply. |
| | | 20 | | /// </summary> |
| | 0 | 21 | | public JournalFilter? Filter { get; set; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// The zero-based page number to get. |
| | | 25 | | /// </summary> |
| | 0 | 26 | | public int? Page { get; set; } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// The size of the page to get. |
| | | 30 | | /// </summary> |
| | 0 | 31 | | public int? PageSize { get; set; } |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// The number of records to skip. |
| | | 35 | | /// </summary> |
| | 0 | 36 | | public int? Skip { get; set; } |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// The number of records to take. |
| | | 40 | | /// </summary> |
| | 0 | 41 | | public int? Take { get; set; } |
| | | 42 | | } |
| | | 43 | | |
| | | 44 | | internal class JournalFilter |
| | | 45 | | { |
| | | 46 | | public ICollection<string>? ActivityIds { get; set; } |
| | | 47 | | public ICollection<string>? ActivityNodeIds { get; set; } |
| | | 48 | | public ICollection<string>? ExcludedActivityTypes { get; set; } |
| | | 49 | | public ICollection<string>? EventNames { get; set; } |
| | | 50 | | } |
| | | 51 | | |
| | | 52 | | internal class Response(ICollection<ExecutionLogRecord> items, long totalCount) |
| | | 53 | | { |
| | | 54 | | public ICollection<ExecutionLogRecord> Items { get; } = items; |
| | | 55 | | public long TotalCount { get; } = totalCount; |
| | | 56 | | } |