Skip to content

GetEmailsRequestDto

← Email DTO

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#)
paginationPaginationдаPagination
statusFilterPaginationFilter<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.
emailContactIdnumber | nullнетint?
emailsstring[] | nullнетSender prefixes, OR-ed together. senderEmail is the single-value form.List<string>?
sourceMailboxesstring[] | 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".
directionEmailDirectionDto | nullнетSingle direction. directions is the multi-select form.EmailDirectionDto?
kindEmailKindDto | nullнетSingle kind. kinds is the multi-select form.
directionsEmailDirectionDto[]нет
kindsEmailKindDto[]нет
titlestringнетSubstring match on the subject.
senderEmailstringнетPrefix match on the sender address.
contactEmailstringнетPrefix match on the contact address the email is attributed to.
messageIdstringнетExact match on the RFC message id.
createdAtPaginationRangeFilter<string>нетISO 8601 range over the creation timestamp.
updatedAtPaginationRangeFilter<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>>"
}