All files / src/clients/ep index.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90                                                                                                                                                                                   
/**
 * European Parliament API client internal modules.
 *
 * - **baseClient** – shared HTTP, caching, rate limiting, and retry infrastructure
 * - **mepClient** – MEP-related API calls
 * - **plenaryClient** – plenary sessions, meetings, and activities
 * - **votingClient** – voting records and speeches
 * - **committeeClient** – committee/corporate-body information
 * - **documentClient** – documents and search
 * - **legislativeClient** – procedures and adopted texts
 * - **questionClient** – parliamentary questions
 * - **vocabularyClient** – controlled vocabularies
 * - **jsonLdHelpers** – pure JSON-LD parsing and extraction functions
 * - **transformers** – pure data transformation functions (API → domain types)
 *
 * @module clients/ep
 */
 
// ─── Infrastructure ───────────────────────────────────────────────────────────
 
export {
  BaseEPClient,
  APIError,
  validateApiUrl,
  DEFAULT_EP_API_BASE_URL,
  DEFAULT_REQUEST_TIMEOUT_MS,
  DEFAULT_RETRY_ENABLED,
  DEFAULT_MAX_RETRIES,
  DEFAULT_CACHE_TTL_MS,
  DEFAULT_MAX_CACHE_SIZE,
  DEFAULT_RATE_LIMIT_TOKENS,
  DEFAULT_RATE_LIMIT_INTERVAL,
  DEFAULT_MAX_RESPONSE_BYTES,
} from './baseClient.js';
export type {
  EPClientConfig,
  EPSharedResources,
  JSONLDResponse,
} from './baseClient.js';
 
// ─── Sub-clients ──────────────────────────────────────────────────────────────
 
export { MEPClient } from './mepClient.js';
export { PlenaryClient } from './plenaryClient.js';
export { VotingClient } from './votingClient.js';
export { CommitteeClient } from './committeeClient.js';
export { DocumentClient } from './documentClient.js';
export { LegislativeClient } from './legislativeClient.js';
export { QuestionClient } from './questionClient.js';
export { VocabularyClient } from './vocabularyClient.js';
 
// ─── JSON-LD helpers (pure, re-exported for consumers) ───────────────────────
 
export {
  toSafeString,
  firstDefined,
  extractField,
  extractDateValue,
  extractActivityDate,
  extractMultilingualText,
  extractTextFromLangArray,
  extractMemberIds,
  extractAuthorId,
  extractDocumentRefs,
  extractLocation,
  extractVoteCount,
  determineVoteOutcome,
  mapDocumentType,
  mapDocumentStatus,
  mapQuestionType,
} from './jsonLdHelpers.js';
 
// ─── Transformers (pure, re-exported for consumers) ──────────────────────────
 
export {
  transformMEP,
  transformMEPDetails,
  transformPlenarySession,
  transformVoteResult,
  transformCorporateBody,
  transformDocument,
  transformParliamentaryQuestion,
  transformSpeech,
  transformProcedure,
  transformAdoptedText,
  transformEvent,
  transformMeetingActivity,
  transformMEPDeclaration,
} from './transformers.js';