40 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MoexClientService Split — Tasks
## Этап 1: Создание инфраструктурного клиента
- [x] 1.1 Создать `moex-http.client.ts` — перенести `request()`, `extractTable()`, circuit breaker, PQueue из `MoexClientService`
- [x] 1.2 Написать unit-тесты для `MoexHttpClient`
- [x] 1.3 Написать тест на circuit breaker (threshold → open → reset)
## Этап 2: Создание доменных клиентов
- [x] 2.1 `MoexSecuritiesClient``searchSecurities()`, `getSecurityDescription()`
- [x] 2.2 `MoexMarketDataClient``getShareMarketData()`, `getShareMarketDataBatch()`, `getBondData()`, `getBondMarketData()`, `getBondPositionDataBatch()`
- [x] 2.3 `MoexCandlesClient``getCandles()`
- [x] 2.4 `MoexHistoryClient``getHistory()`, `getBondHistory()`
- [x] 2.5 `MoexDividendsClient``getDividends()`
- [x] 2.6 Написать unit-тесты для каждого доменного клиента (mocked http client)
## Этап 3: Обновление модуля
- [x] 3.1 Убрать `@Global()` из `MoexClientModule`
- [x] 3.2 Добавить новые клиенты в providers/exports
- [x] 3.3 Убрать старый `MoexClientService` из providers
- [x] 3.4 Проверить, что `MoexHttpClient` не экспортируется
## Этап 4: Миграция потребителей
- [x] 4.1 `shares/` — обновить модуль, сервис, тесты
- [x] 4.2 `bonds/` — обновить модуль, сервис, тесты
- [x] 4.3 `candles/` — обновить модуль, сервис, тесты
- [x] 4.4 `securities/` — обновить модуль, securities.service, screener.service, тесты
- [x] 4.5 `portfolio/` — обновить модуль, сервис, тесты
- [x] 4.6 `tbank/` — обновить broker-events.service, тесты
## Этап 5: Финализация
- [x] 5.1 Удалить старый `moex-client.service.ts`
- [x] 5.2 `npm run build` успешен
- [x] 5.3 Все тесты проходят
- [x] 5.4 Обновить `docs/features/backend-architecture-improvements/tasks.md` — отметить Iteration 6 как выполненную