feat: add typed DNS and DynDNS management for the KAS API#11
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds typed wrappers for the KAS API's DNS and DynDNS function groups, which previously
were only reachable through the generic
RequestAsyncescape hatch. Follows the existingconventions (input models with
ToParameters,Raw+FromMapread models, Y/N booleans,scalar-id extraction).
DNS zone records (
get/add/update/delete/reset_dns_settings)GetDnsRecordsAsync,GetDnsRecordAsync(record_id filter),AddDnsRecordAsync(returns thegenerated
record_id),UpdateDnsRecordAsync,DeleteDnsRecordAsync,ResetDnsSettingsAsyncDnsRecordread model,DnsRecordTypeenum + raw-type escape for unknown typeszone_hosttrailing-dot normalization; emptyrecord_name= zone apexResetDnsSettingsAsyncis destructive (discards all custom records) — flagged in docs/CHANGELOG/READMEdns_settingspermission (else KAS faultdns_settings_not_allowed)DynDNS users (
add/get/update/delete_ddnsuser)AddDynDnsUserAsync(returns the generateddyndns_login),GetDynDnsUsersAsync,GetDynDnsUserAsync,UpdateDynDnsUserAsync,DeleteDynDnsUserAsyncDynDnsUserread model incl.dyndns_target_ipv4/ipv6get_ddnsusersfilters onddns_login, butupdate/deleteusedyndns_loginVerification
assumptions (
record_datanotrecord_value;record_auxis a single field; update/get take nonameserver/record_type).real account (zone
verqo.de), including a full write cycle (add→get→update→delete + cleanup).Confirmed:
add_*returnsrecord_id/dyndns_loginas a string scalar; responses userecord_zone(not
zone_host) anddyndns_target_ipv4/ipv6;dual_stackis Y/N.Tests / build
Follow-up (separate PR)
KasClienttakes the concreteKasSoapTransport(no interface), so the actionnames/parameters the wrappers send aren't unit-testable. A dedicated refactor (
IKasTransport+wrapper-level tests) is tracked and will come as its own PR.