| | | 1 | | using ArturRios.Util.Http; |
| | | 2 | | |
| | | 3 | | namespace ArturRios.Heimdall.Shared.Messages; |
| | | 4 | | |
| | | 5 | | /// <summary>Status codes for <c>ScopeInvitationController</c>'s messages (UC-58…UC-61).</summary> |
| | | 6 | | public static class ScopeInvitationMessageMap |
| | | 7 | | { |
| | 2 | 8 | | public static readonly IReadOnlyDictionary<string, int> StatusCodes = |
| | 2 | 9 | | DataAccessMessageMap.CombinedWith(new Dictionary<string, int> |
| | 2 | 10 | | { |
| | 2 | 11 | | // UC-60 and UC-61 main flows. |
| | 2 | 12 | | [ScopeInvitationMessages.InvitationAccepted] = HttpStatusCodes.Ok, |
| | 2 | 13 | | [ScopeInvitationMessages.InvitationDeclined] = HttpStatusCodes.Ok, |
| | 2 | 14 | | // AF-58c, AF-60a, AF-60b, AF-61a — no open invitation the caller may act on. |
| | 2 | 15 | | [ScopeInvitationMessages.InvitationNotOpen] = HttpStatusCodes.NotFound, |
| | 2 | 16 | | // AF-58a — the scope is unknown or logically deleted; AF-58b — not an owner of it. |
| | 2 | 17 | | [ScopeMessages.ScopeNotFound] = HttpStatusCodes.NotFound, |
| | 2 | 18 | | [ScopeMessages.NotScopeOwner] = HttpStatusCodes.Forbidden, |
| | 2 | 19 | | // UC-58 listing and UC-59 (NFR-10) — page bounds. |
| | 2 | 20 | | [PaginationMessages.InvalidPageNumber] = HttpStatusCodes.BadRequest, |
| | 2 | 21 | | [PaginationMessages.InvalidPageSize] = HttpStatusCodes.BadRequest |
| | 2 | 22 | | }); |
| | | 23 | | } |