> ## Documentation Index
> Fetch the complete documentation index at: https://docs.law4devs.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Annexes

> List, retrieve, and iterate framework annexes with the Law4Devs TypeScript SDK.

## Overview

Annexes are supplementary parts of EU legislation, often containing technical specifications, lists, or tables referenced within the articles. Each annex belongs to one framework and is identified by its annex number or letter (e.g. `"I"`, `"II"`, `"A"`).

***

## Methods

### `list()`

Returns a page of annex summaries for a framework.

```typescript theme={null}
const page = await client.annexes.list('cra', { page: 1, perPage: 20 });

console.log(`CRA has ${page.meta.total} annexes`);

for (const annex of page.data) {
  console.log(`Annex ${annex.annexNumber}: ${annex.title}`);
}
```

**Parameters**

| Parameter       | Type     | Default  | Description                  |
| --------------- | -------- | -------- | ---------------------------- |
| `frameworkSlug` | `string` | required | Framework slug, e.g. `"cra"` |
| `page`          | `number` | `1`      | Page number                  |
| `perPage`       | `number` | `20`     | Items per page (1–100)       |

**Returns** `Promise<Page<AnnexSummary>>`

***

### `get()`

Fetch the full content of a single annex.

```typescript theme={null}
const annex = await client.annexes.get('cra', 'I');

console.log(`Annex ${annex.annexNumber}: ${annex.title}`);
console.log(annex.content);
```

**Parameters**

| Parameter       | Type     | Description                                 |
| --------------- | -------- | ------------------------------------------- |
| `frameworkSlug` | `string` | Framework slug                              |
| `annexNumber`   | `string` | Annex identifier, e.g. `"I"`, `"II"`, `"A"` |

**Returns** `Promise<Annex>`

***

### `iter()`

Iterate over all annexes in a framework.

```typescript theme={null}
for await (const annex of client.annexes.iter('cra')) {
  console.log(`Annex ${annex.annexNumber}: ${annex.title}`);
}
```

**Parameters** — same options as `list()` (except `page`, which is managed internally).

**Returns** `AsyncGenerator<AnnexSummary>`

***

## Models

### `AnnexSummary`

Returned by `list()` and `iter()`.

| Field           | Type             | Description                                 |
| --------------- | ---------------- | ------------------------------------------- |
| `id`            | `number`         | Internal numeric ID                         |
| `frameworkSlug` | `string`         | Parent framework slug                       |
| `annexNumber`   | `string`         | Annex identifier, e.g. `"I"`, `"II"`, `"A"` |
| `title`         | `string \| null` | Annex title                                 |
| `position`      | `number`         | Display order within the framework          |

### `Annex`

Returned by `get()`. Extends `AnnexSummary` with:

| Field     | Type             | Description     |
| --------- | ---------------- | --------------- |
| `content` | `string \| null` | Full annex text |

***

## Example: enumerate all CRA annexes

```typescript theme={null}
const annexTitles: string[] = [];

for await (const annex of client.annexes.iter('cra')) {
  annexTitles.push(`Annex ${annex.annexNumber}: ${annex.title ?? '(no title)'}`);
}

console.log('CRA Annexes:');
for (const title of annexTitles) {
  console.log(` - ${title}`);
}
```
