GetEmailsRequestDto
Filters for GET Api/Emails. Every field except pagination is optional — an absent field means the condition is not applied.
statusFilter.available is the universe the counts are computed over, statusFilter.selected is the choice; an absent or empty selected means every status. The counts describe the slice left by the other filters, not the whole table.
Mailbox permissions are enforced server-side from the JWT and cannot be influenced from here: sourceMailboxes narrows within what the user may already read, it never widens.
Backend-источник: infrastructure.notificationservice/Infrastructure.NotificationService/Nuget.NotificationApiClient/Dto/Requests/GetEmailsRequestDto.cs (infrastructure.notificationservice).
Поля
| Поле | Тип (TS) | Обязательное | Описание | Тип (C#) |
|---|---|---|---|---|
pagination | Pagination | да | — | Pagination |
statusFilter | PaginationFilter<EmailStatusDto> | нет | Status facet. available is the universe the counts are computed over, selected is the choice; an absent or empty selected means every status, so no condition is applied. | — |
emailContactId | number | null | нет | — | int? |
emails | string[] | null | нет | Sender prefixes, OR-ed together. senderEmail is the single-value form. | List<string>? |
sourceMailboxes | string[] | null | нет | Restricts to the listed mailboxes. An empty array is indistinguishable from an absent field in a query string, so it means "no restriction" rather than "no matches". | — |
direction | EmailDirectionDto | null | нет | Single direction. directions is the multi-select form. | EmailDirectionDto? |
kind | EmailKindDto | null | нет | Single kind. kinds is the multi-select form. | — |
directions | EmailDirectionDto[] | нет | — | — |
kinds | EmailKindDto[] | нет | — | — |
title | string | нет | Substring match on the subject. | — |
senderEmail | string | нет | Prefix match on the sender address. | — |
contactEmail | string | нет | Prefix match on the contact address the email is attributed to. | — |
messageId | string | нет | Exact match on the RFC message id. | — |
createdAt | PaginationRangeFilter<string> | нет | ISO 8601 range over the creation timestamp. | — |
updatedAt | PaginationRangeFilter<string> | нет | ISO 8601 range over the last-update timestamp. Emails never updated are excluded. | — |
Пример
json
{
"pagination": "<Pagination>",
"statusFilter": "<PaginationFilter<EmailStatusDto>>",
"emailContactId": 0,
"emails": [],
"sourceMailboxes": [],
"direction": "<emaildirectiondto>",
"kind": "<emailkinddto>",
"directions": [],
"kinds": [],
"title": "string",
"senderEmail": "user@example.com",
"contactEmail": "user@example.com",
"messageId": "uuid",
"createdAt": "<PaginationRangeFilter<string>>",
"updatedAt": "<PaginationRangeFilter<string>>"
}