# Module types

Type Definitions for European Parliament MCP Server

This module exports all custom type definitions used throughout the server, including branded types for compile-time safety and custom error classes for structured error handling.

Intelligence Perspective: Type-safe identifiers (MEPID, SessionID, CommitteeID) ensure data integrity across intelligence analysis pipelines and prevent cross-contamination of different entity types in analytical products.

Business Perspective: Branded types and structured errors provide enterprise-grade reliability guarantees—essential for premium API tier customers and partner integrations.

Marketing Perspective: Advanced TypeScript patterns demonstrate technical excellence— key for developer advocacy and attracting TypeScript-savvy contributors and customers.

Branded Types:

- Prevent mixing of different ID types at compile time
- Include type guards and factory functions for validation
- Ensure type safety for European Parliament data identifiers

Error Classes:

- Structured error handling with proper status codes
- GDPR-compliant error sanitization
- Type-safe error formatting for MCP responses

#### See

- branded - Branded type definitions
- errors - Custom error classes

## Interfaces

MetricResult

## Type Aliases

DataAvailability

## References

Brand → Brand
CommitteeID → CommitteeID
createCommitteeID → createCommitteeID
createDocumentID → createDocumentID
createGroupID → createGroupID
createMEPID → createMEPID
createProcedureID → createProcedureID
createSessionID → createSessionID
createSittingID → createSittingID
createSpeechID → createSpeechID
createVocabularyID → createVocabularyID
DocumentID → DocumentID
EPAPIError → EPAPIError
formatMCPError → formatMCPError
GDPRComplianceError → GDPRComplianceError
GroupID → GroupID
isCommitteeID → isCommitteeID
isDocumentID → isDocumentID
isGroupID → isGroupID
isMCPServerError → isMCPServerError
isMEPID → isMEPID
isProcedureID → isProcedureID
isSessionID → isSessionID
isSittingID → isSittingID
isSpeechID → isSpeechID
isVocabularyID → isVocabularyID
MCPServerError → MCPServerError
MEPID → MEPID
ProcedureID → ProcedureID
RateLimitError → RateLimitError
SessionID → SessionID
SittingID → SittingID
SpeechID → SpeechID
ValidationError → ValidationError
VocabularyID → VocabularyID