Email DTO
Описание сущностей и типов из src/dto/email/.
Обогащено snapshot-данными бэкенд-DTO (3 из 10 типов сопоставлено, snapshot от 2026-05-05T13:21:51.699Z).
Содержание
- ComposeEmailAttachmentRefDto
- ComposeEmailRequestDto
- EmailAttachmentDto
- EmailDetailsDto
- EmailDirectionDto · backend ✓
- EmailKindDto
- EmailStatusDto · backend ✓
- GetEmailsRequestDto · backend ✓
- GetMailboxPermissionsResponseDto
- GetSourceMailboxesResponseDto
ComposeEmailAttachmentRefDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
filePath | string | да | — |
name | string | да | — |
Пример
{
"filePath": "string",
"name": "string"
}ComposeEmailRequestDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
title | string | да | — |
text | string | да | — |
email | string | да | — |
messageId | string | null | нет | — |
emailContactId | number | null | нет | — |
attachments | ComposeEmailAttachmentRefDto[] | да | — |
Пример
{
"title": "string",
"text": "string",
"email": "user@example.com",
"messageId": "uuid",
"emailContactId": 0,
"attachments": []
}EmailAttachmentDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
id | number | да | — |
fileName | string | да | — |
mediaType | string | да | — |
sizeBytes | number | да | — |
contentId | string | null | да | — |
downloadUrl | string | да | — |
Пример
{
"id": 0,
"fileName": "string",
"mediaType": "string",
"sizeBytes": 0,
"contentId": "uuid",
"downloadUrl": "https://..."
}EmailDetailsDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
id | number | да | — |
messageId | string | null | да | — |
emailContactId | number | null | да | — |
subject | string | null | да | — |
bodyHtml | string | да | — |
senderEmail | string | да | — |
sourceMailbox | string | null | да | — |
status | EmailStatusDto | да | — |
direction | EmailDirectionDto | да | — |
kind | EmailKindDto | да | — |
createDateTime | string | да | — |
attachments | EmailAttachmentDto[] | да | — |
Пример
{
"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#) |
|---|---|---|---|
NotFound | 0 | — | 0 |
Incoming | 1 | — | 1 |
Outgoing | 2 | — | 2 |
Пример
0EmailKindDto
Значения
| Имя | Значение | Описание |
|---|---|---|
Regular | 0 | — |
Fax | 1 | — |
Пример
0EmailStatusDto
Backend-источник: infrastructure.notificationservice/Infrastructure.NotificationService/Nuget.NotificationApiClient/Dto/Enums/EmailStatusDto.cs (infrastructure.notificationservice).
Значения
| Имя | Значение (TS) | Описание | Код (C#) |
|---|---|---|---|
NotFound | 0 | — | 0 |
New | 1 | — | 1 |
ActionRequired | 2 | — | 2 |
Processed | 3 | — | 3 |
Spam | 4 | — | 4 |
Archived | 5 | — | 5 |
Пример
0GetEmailsRequestDto
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. | — |
Пример
{
"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
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
mailboxPermissions | Record<string, string> | да | — |
Пример
{
"mailboxPermissions": "<Record<string, string>>"
}GetSourceMailboxesResponseDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
mailboxes | string[] | да | — |
Пример
{
"mailboxes": []
}