Analytics DTO
Описание сущностей и типов из src/dto/analytics/.
Обогащено snapshot-данными бэкенд-DTO (0 из 8 типов сопоставлено, snapshot от 2026-05-05T13:21:51.699Z).
Содержание
- AnalyticsChartRequestParam
- AnalyticsChartResponseDto
- AnalyticsChartSeriesDto
- AnalyticsGranularityDto
- AnalyticsKpiRequestParam
- AnalyticsKpiResponseDto
- AnalyticsKpiValueDto
- TimeBucketDto
AnalyticsChartRequestParam
Query parameters for a chart request.
from/to are calendar dates (YYYY-MM-DD) resolved in the analytics time zone (Europe/Berlin), and to is inclusive. Buckets are cut in that same zone.
region is an ISO 3166-2 code (DE-BE). It does not apply to e-mail metrics, so the e-mail chart ignores it.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
from | string | да | — |
to | string | да | — |
region | string | нет | — |
granularity | AnalyticsGranularityDto | нет | — |
Пример
{
"from": "2026-05-05T08:00:00Z",
"to": "2026-05-05T08:00:00Z",
"region": "string",
"granularity": "<AnalyticsGranularityDto>"
}AnalyticsChartResponseDto
granularity echoes what the backend actually applied — format the X axis by it.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
successfully | boolean | да | — |
granularity | AnalyticsGranularityDto | да | — |
series | AnalyticsChartSeriesDto[] | да | — |
Пример
{
"successfully": false,
"granularity": "<AnalyticsGranularityDto>",
"series": []
}AnalyticsChartSeriesDto
Time series of one metric. Every bucket of the requested period is present — empty ones come as zero, so nothing needs densifying on the client.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
key | string | да | — |
buckets | TimeBucketDto[] | да | — |
Пример
{
"key": "string",
"buckets": []
}AnalyticsGranularityDto
Значения
| Имя | Значение | Описание |
|---|---|---|
Day | 1 | — |
Week | 2 | — |
Month | 3 | — |
Пример
1AnalyticsKpiRequestParam
Query parameters for a KPI panel request.
from/to are calendar dates (YYYY-MM-DD) resolved in the analytics time zone (Europe/Berlin), and to is inclusive. There is no granularity: a KPI panel is a single aggregate per metric.
region is an ISO 3166-2 code (DE-BE). It does not apply to e-mail metrics — an e-mail has no address of its own — so the mail panel ignores it.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
from | string | да | — |
to | string | да | — |
region | string | нет | — |
Пример
{
"from": "2026-05-05T08:00:00Z",
"to": "2026-05-05T08:00:00Z",
"region": "string"
}AnalyticsKpiResponseDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
successfully | boolean | да | — |
conversionTarget | number | да | — |
values | AnalyticsKpiValueDto[] | да | — |
Пример
{
"successfully": false,
"conversionTarget": 0,
"values": []
}AnalyticsKpiValueDto
Aggregate of one metric over the requested period. key is a stable snake_case metric key.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
key | string | да | — |
value | number | да | — |
Пример
{
"key": "string",
"value": 0
}TimeBucketDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
bucket | string | да | — |
value | number | да | — |
Пример
{
"bucket": "string",
"value": 0
}