Skip to content

feat: add typed DNS and DynDNS management for the KAS API#11

Merged
emuuu merged 1 commit into
mainfrom
feat/dns-ddns
Jun 11, 2026
Merged

feat: add typed DNS and DynDNS management for the KAS API#11
emuuu merged 1 commit into
mainfrom
feat/dns-ddns

Conversation

@emuuu

@emuuu emuuu commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Adds typed wrappers for the KAS API's DNS and DynDNS function groups, which previously
were only reachable through the generic RequestAsync escape hatch. Follows the existing
conventions (input models with ToParameters, Raw+FromMap read models, Y/N booleans,
scalar-id extraction).

DNS zone records (get/add/update/delete/reset_dns_settings)

  • GetDnsRecordsAsync, GetDnsRecordAsync (record_id filter), AddDnsRecordAsync (returns the
    generated record_id), UpdateDnsRecordAsync, DeleteDnsRecordAsync, ResetDnsSettingsAsync
  • DnsRecord read model, DnsRecordType enum + raw-type escape for unknown types
  • Automatic zone_host trailing-dot normalization; empty record_name = zone apex
  • ⚠️ ResetDnsSettingsAsync is destructive (discards all custom records) — flagged in docs/CHANGELOG/README
  • DNS write actions require the account's dns_settings permission (else KAS fault dns_settings_not_allowed)

DynDNS users (add/get/update/delete_ddnsuser)

  • AddDynDnsUserAsync (returns the generated dyndns_login), GetDynDnsUsersAsync,
    GetDynDnsUserAsync, UpdateDynDnsUserAsync, DeleteDynDnsUserAsync
  • DynDnsUser read model incl. dyndns_target_ipv4/ipv6
  • Documented KAS quirk: get_ddnsusers filters on ddns_login, but update/delete use dyndns_login

Verification

  • All parameters verified against the official KAS phpdoc — nothing guessed. Corrected several
    assumptions (record_data not record_value; record_aux is a single field; update/get take no
    nameserver/record_type).
  • Request/response shapes, add-return scalars and real response field names verified live against a
    real account (zone verqo.de), including a full write cycle (add→get→update→delete + cleanup).
    Confirmed: add_* returns record_id / dyndns_login as a string scalar; responses use record_zone
    (not zone_host) and dyndns_target_ipv4/ipv6; dual_stack is Y/N.

Tests / build

  • 176 NUnit tests green (net10.0). Library compiles for net8.0/9.0/10.0 with 0 warnings.

Follow-up (separate PR)

  • Transport seam: KasClient takes the concrete KasSoapTransport (no interface), so the action
    names/parameters the wrappers send aren't unit-testable. A dedicated refactor (IKasTransport +
    wrapper-level tests) is tracked and will come as its own PR.

Wraps the KAS zone-record and DynDNS user actions behind typed models,
following the existing input/read-model conventions (ToParameters /
Raw + FromMap, Y/N booleans, scalar-id extraction).

DNS zone records (get/add/update/delete/reset_dns_settings):
- GetDnsRecordsAsync, GetDnsRecordAsync (record_id filter),
  AddDnsRecordAsync (returns the generated record_id),
  UpdateDnsRecordAsync, DeleteDnsRecordAsync, ResetDnsSettingsAsync
- DnsRecord read model, DnsRecordType enum plus a raw-type escape
- automatic zone_host trailing-dot normalization; empty record_name
  is treated as the zone apex
- ResetDnsSettingsAsync is destructive (discards all custom records)

DynDNS users (add/get/update/delete_ddnsuser):
- AddDynDnsUserAsync (returns the generated dyndns_login),
  GetDynDnsUsersAsync, GetDynDnsUserAsync, UpdateDynDnsUserAsync,
  DeleteDynDnsUserAsync
- DynDnsUser read model; note the KAS filter quirk: get_ddnsusers
  filters on ddns_login while update/delete use dyndns_login

Parameter names verified against the KAS phpdoc; request/response shapes,
add-return scalars and field names verified live against a real account.
Adds NUnit coverage for ToParameters mapping, validation, FromMap and the
id-extraction helpers. Multi-targets net8.0/9.0/10.0; 176 tests passing.
@emuuu emuuu merged commit ae18744 into main Jun 11, 2026
4 checks passed
@emuuu emuuu deleted the feat/dns-ddns branch June 11, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant