# ListNotificationTemplates

## Overview

ListNotificationTemplates returns NotificationTemplate rows matching the supplied filters. Each filter is independently optional, so callers can list every template, every template for a given `eventType`, every locale variant of a `(eventType, channelId)` pair, or any combination. Admin UIs use this query to render the template-management screen and to drive coverage reporting (e.g., "which `(eventType, channel)` pairs are missing a Japanese row?").

## Business Rules

- Accepts optional filter parameters: `{ eventType?, channelId?, locale? }`
- Multiple filters are combined with AND logic
- Returns every row when no filter is supplied
- Returns an empty list when no rows match the filter combination
- Each returned row carries `id`, `eventType`, `channelId`, `locale`, `subject`, `body`, optional `htmlBody`, and `variableSchema`

## Process Flow

```mermaid
flowchart TD
    A[Receive optional filters] --> B[Build NotificationTemplate query]
    B --> C[Apply eventType filter if provided]
    C --> D[Apply channelId filter if provided]
    D --> E[Apply locale filter if provided]
    E --> F[Execute query]
    F --> G[Return list of NotificationTemplate rows]
```

## External Dependencies

- None

## Error Scenarios

- **NO_MATCH**: No matching row exists for the supplied input; null or empty result is returned

> Returning `NO_MATCH` is a normal empty/null result rather than a thrown error — the query returns the null/empty value and does not raise `NoMatchError`.

## Test Cases

- returns every template when no filter is supplied
- filters by eventType when provided
- filters by channelId when provided
- filters by locale when provided
- combines multiple filters with AND logic
- returns an empty list when no rows match
- returns rows for every locale variant of a given `(eventType, channelId)` when only those two filters are supplied
