Analytics DTO
Описание сущностей и типов из src/dto/analytics/.
Обогащено snapshot-данными бэкенд-DTO (0 из 13 типов сопоставлено, snapshot от 2026-05-05T13:21:51.699Z).
Содержание
- AnalyticsChartRequestParam
- AnalyticsChartResponseDto
- AnalyticsChartSeriesDto
- AnalyticsGranularityDto
- AnalyticsKpiRequestParam
- AnalyticsKpiResponseDto
- AnalyticsKpiValueDto
- AnalyticsRequestParam
- AnalyticsSectionDto
- AnalyticsSectionResponseDto
- BreakdownDto
- MetricDto
- 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 | да | — |
values | AnalyticsKpiValueDto[] | да | — |
Пример
{
"successfully": false,
"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
}AnalyticsRequestParam
Query parameters for an analytics section request.
from/to and the optional compareFrom/compareTo are ISO-8601 date-time strings. When both compare bounds are set, each metric also carries previousValue and deltaPercent.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
from | string | да | — |
to | string | да | — |
region | string | нет | — |
compareFrom | string | нет | — |
compareTo | string | нет | — |
granularity | AnalyticsGranularityDto | нет | — |
Пример
{
"from": "2026-05-05T08:00:00Z",
"to": "2026-05-05T08:00:00Z",
"region": "string",
"compareFrom": "2026-05-05T08:00:00Z",
"compareTo": "2026-05-05T08:00:00Z",
"granularity": "<AnalyticsGranularityDto>"
}AnalyticsSectionDto
Значения
| Имя | Значение | Описание |
|---|---|---|
Clients | 1 | — |
Workers | 2 | — |
CallCenter | 3 | — |
Marketing | 4 | — |
Communications | 5 | — |
Пример
1AnalyticsSectionResponseDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
section | AnalyticsSectionDto | да | — |
metrics | MetricDto[] | да | — |
Пример
{
"section": "<AnalyticsSectionDto>",
"metrics": []
}BreakdownDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
dimension | string | да | — |
key | string | да | — |
value | number | да | — |
Пример
{
"dimension": "string",
"key": "string",
"value": 0
}MetricDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
key | string | да | — |
label | string | да | — |
value | number | да | — |
previousValue | number | null | нет | — |
deltaPercent | number | null | нет | — |
series | TimeBucketDto[] | да | — |
breakdowns | BreakdownDto[] | да | — |
Пример
{
"key": "string",
"label": "string",
"value": 0,
"previousValue": 0,
"deltaPercent": 0,
"series": [],
"breakdowns": []
}TimeBucketDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
bucket | string | да | — |
value | number | да | — |
Пример
{
"bucket": "string",
"value": 0
}