Skip to content

Email DTO

Описание сущностей и типов из src/dto/email/.

Обогащено snapshot-данными бэкенд-DTO (3 из 10 типов сопоставлено, snapshot от 2026-05-05T13:21:51.699Z).

Содержание


ComposeEmailAttachmentRefDto

Поля

ПолеТипОбязательноеОписание
filePathstringда
namestringда

Пример

json
{
  "filePath": "string",
  "name": "string"
}


ComposeEmailRequestDto

Поля

ПолеТипОбязательноеОписание
titlestringда
textstringда
emailstringда
messageIdstring | nullнет
emailContactIdnumber | nullнет
attachmentsComposeEmailAttachmentRefDto[]да

Пример

json
{
  "title": "string",
  "text": "string",
  "email": "user@example.com",
  "messageId": "uuid",
  "emailContactId": 0,
  "attachments": []
}


EmailAttachmentDto

Поля

ПолеТипОбязательноеОписание
idnumberда
fileNamestringда
mediaTypestringда
sizeBytesnumberда
contentIdstring | nullда
downloadUrlstringда

Пример

json
{
  "id": 0,
  "fileName": "string",
  "mediaType": "string",
  "sizeBytes": 0,
  "contentId": "uuid",
  "downloadUrl": "https://..."
}


EmailDetailsDto

Поля

ПолеТипОбязательноеОписание
idnumberда
messageIdstring | nullда
emailContactIdnumber | nullда
subjectstring | nullда
bodyHtmlstringда
senderEmailstringда
sourceMailboxstring | nullда
statusEmailStatusDtoда
directionEmailDirectionDtoда
kindEmailKindDtoда
createDateTimestringда
attachmentsEmailAttachmentDto[]да

Пример

json
{
  "id": 0,
  "messageId": "uuid",
  "emailContactId": 0,
  "subject": "string",
  "bodyHtml": "string",
  "senderEmail": "user@example.com",
  "sourceMailbox": "user@example.com",
  "status": "<EmailStatusDto>",
  "direction": "<EmailDirectionDto>",
  "kind": "<EmailKindDto>",
  "createDateTime": "2026-05-05T08:00:00Z",
  "attachments": []
}


EmailDirectionDto

Backend-источник: infrastructure.notificationservice/Infrastructure.NotificationService/Nuget.NotificationApiClient/Dto/Enums/EmailDirectionDto.cs (infrastructure.notificationservice).

Значения

ИмяЗначение (TS)ОписаниеКод (C#)
NotFound00
Incoming11
Outgoing22

Пример

json
0


EmailKindDto

Значения

ИмяЗначениеОписание
Regular0
Fax1

Пример

json
0


EmailStatusDto

Backend-источник: infrastructure.notificationservice/Infrastructure.NotificationService/Nuget.NotificationApiClient/Dto/Enums/EmailStatusDto.cs (infrastructure.notificationservice).

Значения

ИмяЗначение (TS)ОписаниеКод (C#)
NotFound00
New11
ActionRequired22
Processed33
Spam44
Archived55

Пример

json
0


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#)
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>>"
}


GetMailboxPermissionsResponseDto

Поля

ПолеТипОбязательноеОписание
mailboxPermissionsRecord<string, string>да

Пример

json
{
  "mailboxPermissions": "<Record<string, string>>"
}


GetSourceMailboxesResponseDto

Поля

ПолеТипОбязательноеОписание
mailboxesstring[]да

Пример

json
{
  "mailboxes": []
}