# ListAccounts

## Overview

ListAccounts retrieves company-scoped GL accounts. Results are sorted by account code by default and can be filtered by account ids, account type, and status.

## Business Rules

- `companyId` is required
- Optional filters: `accountIds`, `accountType`, `status`
- Results are ordered by account code ascending by default
- Pagination supports `limit`, `offset`, `orderBy`, and `orderDirection`

## Process Flow

```mermaid
flowchart TD
    A[Receive list request] --> B[Filter by company]
    B --> C[Apply optional id/type/status filters]
    C --> D[Order and paginate]
    D --> E[Return account page]
```

## External Dependencies

- None

## Error Scenarios

- None

## Test Cases

- returns all company accounts when no filters applied
- returns accounts filtered by account type
- returns accounts filtered by status
- returns accounts filtered by account ids
- returns an empty page when account ids filter is empty
- orders accounts by code ascending by default
