# Class CommitteeClient

Sub-client for committee/corporate-body EP API endpoints.

#### Hierarchy (View Summary)

- BaseEPClient
  - CommitteeClient

- Defined in clients/ep/committeeClient.ts:33

##### Index

### Constructors

constructor

### Properties

baseURL
cache
enableRetry
maxResponseBytes
maxRetries
rateLimiter
timeoutMs

### Methods

clearCache
evictFromCache
fetchCommitteeDirectly
get
getCacheStats
getCommitteeInfo
getCorporateBodiesFeed
getCurrentCorporateBodies
resolveCommittee
searchCommitteeInList
transformCorporateBody

## Constructors

### constructor

- new CommitteeClient(
  config?: EPClientConfig,
  shared?: EPSharedResources,
  ): CommitteeClient

  #### Parameters

  - config: EPClientConfig = {}
  - `Optional` shared: EPSharedResources

  #### Returns CommitteeClient

  Overrides BaseEPClient.constructor

  - Defined in clients/ep/committeeClient.ts:34

## Properties

### `Protected` `Readonly` baseURL

baseURL: string

European Parliament API base URL.

Inherited from BaseEPClient.baseURL

- Defined in clients/ep/baseClient.ts:217

### `Protected` `Readonly` cache

cache: LRUCache<string, Record<string, unknown>>

LRU cache for API responses.

Inherited from BaseEPClient.cache

- Defined in clients/ep/baseClient.ts:215

### `Protected` `Readonly` enableRetry

enableRetry: boolean

Enable automatic retry on transient failures.

Inherited from BaseEPClient.enableRetry

- Defined in clients/ep/baseClient.ts:223

### `Protected` `Readonly` maxResponseBytes

maxResponseBytes: number

Maximum allowed response body size in bytes.

Inherited from BaseEPClient.maxResponseBytes

- Defined in clients/ep/baseClient.ts:227

### `Protected` `Readonly` maxRetries

maxRetries: number

Maximum number of retry attempts.

Inherited from BaseEPClient.maxRetries

- Defined in clients/ep/baseClient.ts:225

### `Protected` `Readonly` rateLimiter

rateLimiter: RateLimiter

Token bucket rate limiter.

Inherited from BaseEPClient.rateLimiter

- Defined in clients/ep/baseClient.ts:219

### `Protected` `Readonly` timeoutMs

timeoutMs: number

Request timeout in milliseconds.

Inherited from BaseEPClient.timeoutMs

- Defined in clients/ep/baseClient.ts:221

## Methods

### clearCache

- clearCache(): void

  Clears all entries from the LRU cache.

  #### Returns void

  Inherited from BaseEPClient.clearCache

  - Defined in clients/ep/baseClient.ts:666

### `Protected` evictFromCache

- evictFromCache(endpoint: string, params?: Record<string, unknown>): void

  Evicts a single cache entry matching the given endpoint and params. Sub-clients use this when they detect that a successfully-fetched payload is a content-pending sentinel that must not be served from cache for the remainder of the TTL — eviction lets availability recover as soon as the upstream document is enriched.

  #### Parameters

  - endpoint: string

    API endpoint path (same value passed to get)

  - `Optional` params: Record<string, unknown>

    Optional query parameters (same value passed to get)

  #### Returns void

  #### Protected

  Inherited from BaseEPClient.evictFromCache

  - Defined in clients/ep/baseClient.ts:681

### `Private` fetchCommitteeDirectly

- fetchCommitteeDirectly(bodyId: string): Promise<Committee | null>

  Attempts a direct corporate-body lookup by ID.

  #### Parameters

  - bodyId: string

  #### Returns Promise<Committee | null>

  #### Private

  - Defined in clients/ep/committeeClient.ts:63

### `Protected` get

- get<T extends Record<string, unknown>>(
  endpoint: string,
  params?: Record<string, unknown>,
  minimumTimeoutMs?: number,
  ): Promise<T>

  Executes a cached, rate-limited GET request to the EP API.

  #### Type Parameters

  - T extends Record<string, unknown>

    Expected response type (extends `Record<string, unknown>`)

  #### Parameters

  - endpoint: string

    API endpoint path (relative to `baseURL`)

  - `Optional` params: Record<string, unknown>

    Optional query parameters

  - `Optional` minimumTimeoutMs: number

    Optional per-request minimum timeout in milliseconds. When provided, the effective timeout is `Math.max(minimumTimeoutMs, this.timeoutMs)`, so the global timeout (set via `--timeout` or `EP_REQUEST_TIMEOUT_MS`) can still extend it beyond the per-endpoint minimum. Use for known slow EP API endpoints such as `procedures/feed`.

  #### Returns Promise<T>

  Promise resolving to the typed API response

  #### Throws

  On HTTP errors, network failures, or parse failures

  #### Protected

  Inherited from BaseEPClient.get

  - Defined in clients/ep/baseClient.ts:606

### getCacheStats

- getCacheStats(): {
  hitRate: number;
  hits: number;
  maxSize: number;
  misses: number;
  size: number;
  }

  Returns cache statistics for monitoring and debugging.

  #### Returns { hitRate: number; hits: number; maxSize: number; misses: number; size: number }

  `{ size, maxSize, hitRate, hits, misses }`

  Inherited from BaseEPClient.getCacheStats

  - Defined in clients/ep/baseClient.ts:690

### getCommitteeInfo

- getCommitteeInfo(
  params: { abbreviation?: string; id?: string },
  ): Promise<Committee>

  Retrieves committee (corporate body) information by ID or abbreviation.

  EP API Endpoint: `GET /corporate-bodies/{body-id}` or `GET /corporate-bodies`

  #### Parameters

  - params: { abbreviation?: string; id?: string }

    id or abbreviation of the committee

  #### Returns Promise<Committee>

  Committee information

  #### Security

  Audit logged per GDPR Article 30

  - Defined in clients/ep/committeeClient.ts:106

### getCorporateBodiesFeed

- getCorporateBodiesFeed(): Promise<JSONLDResponse<Record<string, unknown>>>

  Retrieves recently updated corporate bodies via the feed endpoint. EP API Endpoint: `GET /corporate-bodies/feed`

  Fixed-window feed — no `timeframe` parameter per OpenAPI spec. Extended timeout applied (120 s minimum).

  #### Returns Promise<JSONLDResponse<Record<string, unknown>>>

  - Defined in clients/ep/committeeClient.ts:133

### getCurrentCorporateBodies

- getCurrentCorporateBodies(
  params?: { limit?: number; offset?: number },
  ): Promise<PaginatedResponse<Committee>>

  Returns the list of all current EP Corporate Bodies for today's date. EP API Endpoint: `GET /corporate-bodies/show-current`

  #### Parameters

  - params: { limit?: number; offset?: number } = {}

  #### Returns Promise<PaginatedResponse<Committee>>

  - Defined in clients/ep/committeeClient.ts:143

### `Private` resolveCommittee

- resolveCommittee(searchTerm: string): Promise<Committee>

  Resolves a committee by trying direct lookup then list search.

  #### Parameters

  - searchTerm: string

  #### Returns Promise<Committee>

  #### Throws

  If committee not found

  #### Private

  - Defined in clients/ep/committeeClient.ts:47

### `Private` searchCommitteeInList

- searchCommitteeInList(searchTerm: string): Promise<Committee | null>

  Searches the corporate-bodies list for a matching committee.

  #### Parameters

  - searchTerm: string

  #### Returns Promise<Committee | null>

  #### Private

  - Defined in clients/ep/committeeClient.ts:81

### `Private` transformCorporateBody

- transformCorporateBody(apiData: Record<string, unknown>): Committee

  #### Parameters

  - apiData: Record<string, unknown>

  #### Returns Committee

  - Defined in clients/ep/committeeClient.ts:38