src/shared/data/api/README.md
This directory contains type definitions for the DataApi system.
src/shared/data/api/
├── types.ts # Core request/response types
├── paths.ts # Path template utilities
├── errors.ts # Error handling
└── schemas/
├── apiSchemas.ts # Schema composition
└── *.ts # Domain-specific schemas
Every module is imported directly — there is no barrel. Infrastructure types come from types / paths / errors; domain DTOs come from their schema files.
// Infrastructure types (direct module imports)
import type { DataRequest, DataResponse, ApiClient } from '@shared/data/api/types'
import { ErrorCode, DataApiError, DataApiErrorFactory } from '@shared/data/api/errors'
// Domain DTOs (directly from schema files)
import type { Topic, CreateTopicDto } from '@shared/data/api/schemas/topics'
import type { Message, CreateMessageDto } from '@shared/data/api/schemas/messages'
schemas/ (e.g., topics.ts)schemas/apiSchemas.ts using intersection typesrc/main/data/api/handlers/