| | | 1 | | using System.Text.Json.Serialization; |
| | | 2 | | using ArturRios.Heimdall.Shared.Security; |
| | | 3 | | using ArturRios.Mediator.Query; |
| | | 4 | | |
| | | 5 | | namespace ArturRios.Heimdall.Query.Input; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// Request to list the applications of a scope, with pagination and optional filtering (UC-17, |
| | | 9 | | /// FR-AP-05). <see cref="ScopeId" /> comes from the route; |
| | | 10 | | /// <see cref="ActingPersonId" />/<see cref="ActingRole" /> are set by the controller from the |
| | | 11 | | /// authenticated caller and are never taken from the request — a Scope Admin sees only the |
| | | 12 | | /// applications they own, so a forged acting id would be a forged answer. All three are |
| | | 13 | | /// <c>[JsonIgnore]</c>, which <c>ServerPopulatedBindingMetadataProvider</c> turns into |
| | | 14 | | /// "not bindable", so they never reach the public contract. |
| | | 15 | | /// </summary> |
| | | 16 | | public class ListScopeApplicationsQuery : BaseQuery, IActorScoped |
| | | 17 | | { |
| | | 18 | | /// <summary>Public identifier of the scope whose applications are listed (assigned from the route).</summary> |
| | | 19 | | [JsonIgnore] |
| | 43 | 20 | | public Guid ScopeId { get; set; } |
| | | 21 | | |
| | | 22 | | /// <summary>Optional case-insensitive substring filter on the application's name.</summary> |
| | 42 | 23 | | public string? Name { get; set; } |
| | | 24 | | |
| | | 25 | | /// <summary> |
| | | 26 | | /// Optional filter on the owner's <c>PublicId</c>. Useful to a System Admin narrowing a busy |
| | | 27 | | /// scope; inert for a Scope Admin, whose results are already restricted to their own. |
| | | 28 | | /// </summary> |
| | 24 | 29 | | public Guid? OwnerId { get; set; } |
| | | 30 | | |
| | | 31 | | /// <summary>When <c>true</c>, logically deleted applications are included (FR-AP-09).</summary> |
| | 18 | 32 | | public bool IncludeDeleted { get; set; } |
| | | 33 | | |
| | | 34 | | [JsonIgnore] |
| | 48 | 35 | | public Guid ActingPersonId { get; set; } |
| | | 36 | | |
| | | 37 | | [JsonIgnore] |
| | 56 | 38 | | public int ActingRole { get; set; } |
| | | 39 | | } |