technitium 0.4.0

Typed async Rust client for the Technitium DNS Server API
Documentation
# TODO — Type-Safe API Coverage

Tracked work remaining after the initial type-safe record/zone restructuring.
Each section references the action planning docs in `actions/` for full parameter specs.

---

## 1. Type System Improvements

### 1.1 CreateZoneConfig enum
**Priority: High** — Zone creation currently takes a bare `ZoneType` enum with no way to pass
type-specific required params (e.g. `primaryNameServerAddresses` for `SecondaryForwarder`).

- [ ] Add `CreateZoneConfig` enum to `src/types/zone.rs` with per-type variants
- [ ] Add `ZoneTransferProtocol` enum
- [ ] Implement `AsParams` for `CreateZoneConfig`
- [ ] Update `Client::create_zone` to accept `CreateZoneConfig`
- [ ] Update `ZoneClient::create` (if added) or callers
- [ ] Update `tests/zones.rs`
- **Ref:** `actions/zone_create.md`

### 1.2 SetZoneOptions type-safe struct
**Priority: Medium** — `ZoneOptions` currently only has 2 fields; the API has 20+ with a
zone-type validity matrix (some params only apply to Secondary, Forwarder, etc.).

- [ ] Expand `ZoneOptions` or create `SetZoneOptions` with all documented params
- [ ] Model zone-type-dependent validity (possibly a builder or enum-based approach)
- [ ] Handle the `"false"` string convention for clearing list params
- **Ref:** `actions/zone_options_get.md`, `actions/zone_options_set.md`

### 1.3 Typed record response deserialization
**Priority: Low** — `Record.data` is currently `serde_json::Value`. Could become per-type
structs to provide typed access to rData fields.

- [ ] Define per-type rData structs (at least for common types: A, AAAA, MX, SRV, TXT, CNAME)
- [ ] Implement deserialization that dispatches on `record_type`
- **Ref:** `actions/record_get.md`

### 1.4 DNSSEC sign algorithm-dependent params
**Priority: Medium** — `zone_dnssec_sign` requires different params based on algorithm choice
(RSA needs key size, ECDSA needs curve, EdDSA needs neither).

- [ ] Create `DnssecSignConfig` enum with `Rsa { key_size }`, `Ecdsa { curve }`, `EdDsa` variants
- [ ] Implement `AsParams`
- **Ref:** `actions/zone_dnssec_sign.md`

---

## 2. Missing API Endpoints

### 2.1 User API — not yet implemented
- [ ] `user_change_password``actions/user_change_password.md`
- [ ] `user_2fa_init``actions/user_2fa_init.md`
- [ ] `user_2fa_enable``actions/user_2fa_enable.md`
- [ ] `user_2fa_disable``actions/user_2fa_disable.md`
- [ ] `user_profile_get``actions/user_profile_get.md`
- [ ] `user_profile_set``actions/user_profile_set.md`
- [ ] `user_session_delete``actions/user_session_delete.md`
- [ ] `user_check_for_update``actions/user_check_for_update.md`

### 2.2 Admin API — partially implemented (7 of 32)
**Implemented:** list_users, create_user, get_user, delete_user, list_groups, create_group, delete_group

**Missing:**
- [ ] `admin_list_sessions``actions/admin_list_sessions.md`
- [ ] `admin_create_api_token``actions/admin_create_api_token.md`
- [ ] `admin_delete_session``actions/admin_delete_session.md`
- [ ] `admin_get_user_details``actions/admin_get_user_details.md`
- [ ] `admin_set_user_details``actions/admin_set_user_details.md`
- [ ] `admin_get_group_details``actions/admin_get_group_details.md`
- [ ] `admin_set_group_details``actions/admin_set_group_details.md`
- [ ] `admin_delete_group` (full version) — `actions/admin_delete_group.md`
- [ ] `admin_list_permissions``actions/admin_list_permissions.md`
- [ ] `admin_get_permission_details``actions/admin_get_permission_details.md`
- [ ] `admin_set_permission_details``actions/admin_set_permission_details.md`
- [ ] Cluster: `get_cluster_state`, `initialize_cluster`, `delete_cluster`, `join_cluster`,
      `remove_secondary_node`, `delete_secondary_node`, `update_secondary_node`,
      `transfer_config`, `set_cluster_options`, `init_join_cluster`, `leave_cluster`,
      `notify_cluster`, `resync_cluster`, `update_primary_node`, `promote_to_primary`,
      `update_node_ip_addresses`
- **Ref:** `actions/admin_*.md` (32 files)

### 2.3 Zone API — partially implemented
**Missing:**
- [ ] `zone_list_catalogs``actions/zone_list_catalogs.md`
- [ ] `zone_resync``actions/zone_resync.md`
- [ ] `zone_permissions_get``actions/zone_permissions_get.md`
- [ ] `zone_permissions_set``actions/zone_permissions_set.md`
- [ ] All DNSSEC operations (14 endpoints):
      `sign`, `unsign`, `view_ds`, `properties_get`, `convert_to_nsec`, `convert_to_nsec3`,
      `update_nsec3_params`, `update_dnskey_ttl`, `add_private_key`, `update_private_key`,
      `delete_private_key`, `publish_all_private_keys`, `rollover_dnskey`, `retire_dnskey`
- **Ref:** `actions/zone_*.md`

### 2.4 DHCP API — partially implemented (4 of 12)
**Implemented:** list_dhcp_scopes, get_dhcp_scope, list_dhcp_leases, remove_dhcp_lease

**Missing:**
- [ ] `dhcp_set_scope` (35 params, pipe-separated compounds) — `actions/dhcp_set_scope.md`
- [ ] `dhcp_add_reserved_lease``actions/dhcp_add_reserved_lease.md`
- [ ] `dhcp_remove_reserved_lease``actions/dhcp_remove_reserved_lease.md`
- [ ] `dhcp_convert_to_reserved``actions/dhcp_convert_to_reserved.md`
- [ ] `dhcp_convert_to_dynamic``actions/dhcp_convert_to_dynamic.md`
- [ ] `dhcp_enable_scope``actions/dhcp_enable_scope.md`
- [ ] `dhcp_disable_scope``actions/dhcp_disable_scope.md`
- [ ] `dhcp_delete_scope``actions/dhcp_delete_scope.md`

### 2.5 Settings API — partially implemented (4 of 8)
**Implemented:** get_settings, set_settings, backup_settings, restore_settings

**Missing:**
- [ ] `settings_getTsigKeyNames``actions/settings_getTsigKeyNames.md`
- [ ] `settings_forceUpdateBlockLists``actions/settings_forceUpdateBlockLists.md`
- [ ] `settings_temporaryDisableBlocking``actions/settings_temporaryDisableBlocking.md`

### 2.6 Apps API — missing download variants
**Implemented:** list, list_store, install, update, uninstall, get_config, set_config

**Missing:**
- [ ] `apps_download_and_install``actions/apps_download_and_install.md`
- [ ] `apps_download_and_update``actions/apps_download_and_update.md`

### 2.7 Log API — partially implemented (4 of 6)
**Implemented:** list_logs, query_logs, download_log, delete_log

**Missing:**
- [ ] `log_deleteAll``actions/log_deleteAll.md`
- [ ] `log_export``actions/log_export.md`

### 2.8 Dashboard API — fully implemented (3/3)

### 2.9 Cache API — fully implemented (3/3)

### 2.10 Allowed Zones API — fully implemented (6/6)

### 2.11 Blocked Zones API — fully implemented (6/6)

### 2.12 DNS Client API — fully implemented (1/1 + options variant)

---

## 3. Serialization / DX Improvements

### 3.1 Pipe-separated compound parameter types
**Priority: Medium** — Several DHCP and settings params use `|`-separated formats.

- [ ] Create `PipeSeparatedList<T>` type with `Display`/`FromStr` for `dhcp_set_scope` params
      (`staticRoutes`, `vendorInfo`, `genericOptions`, `exclusions`, `reservedLeases`)
- [ ] Create similar types for zone `updateSecurityPolicies`
- **Ref:** `actions/dhcp_set_scope.md`

### 3.2 ClearableList wrapper
**Priority: Low** — Settings and zone options use the string `"false"` to clear list params.

- [ ] Create `ClearableList<T>` that serializes to `"false"` when empty/cleared
- **Ref:** `actions/settings_set.md`, `actions/zone_options_set.md`

---

## 4. Integration Test Expansion

- [ ] Add `delete_record` integration tests using `DeleteRecordId::A`, `::MX`, `::SRV`
- [ ] Add `update_record` integration tests using `UpdateRecordData` for more types
- [ ] Add zone creation tests for `Secondary`, `Forwarder`, `SecondaryForwarder` types
- [ ] Add DHCP scope CRUD tests
- [ ] Add DNSSEC sign/unsign round-trip test