# GetNotificationChannel

## Overview

GetNotificationChannel retrieves a single NotificationChannel registry row by its `channelId`. Returns the channel's display name, capability flags (`supportsHtmlBody`, `supportsAttachments`, `supportsRichActions`), and the admin `enabled` toggle. The dispatcher and the template-rendering feature use this query to read channel metadata at dispatch time; admin UIs use it to display channel configuration.

## Business Rules

- Accepts a single lookup parameter: `{ channelId }` where `channelId` is the channel enum value (e.g., `IN_APP`, `EMAIL`, `SMS`, `PUSH`, `SLACK`, `TEAMS`)
- Returns null when no NotificationChannel row matches the supplied `channelId`
- Returns the channel regardless of its `enabled` value — the kill-switch flag is data on the row, not a filter on the lookup
- Reserved channel ids that have no registered adapter still return their registry row when present in the seed catalog

## Process Flow

```mermaid
flowchart TD
    A[Receive channelId] --> B[Load NotificationChannel by channelId]
    B --> C{Row found?}
    C -->|No| D[Return null]
    C -->|Yes| E[Return NotificationChannel record with capabilities and enabled flag]
```

## 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 NotificationChannel when found by channelId
- returns null when channelId does not exist in the registry
- returns the channel with `enabled = false` (does not filter by enabled flag)
- returns capability flags (supportsHtmlBody, supportsAttachments, supportsRichActions) on the result
- returns reserved channels (SMS, PUSH, SLACK, TEAMS) when present in the registry
