feat: typed account-management API#10
Merged
Merged
Conversation
Cover the KAS account-administration actions with typed models, mirroring the existing mailbox/forward style (ToParameters/FromMap, DI, NUnit). Actions: - Subaccounts: AddAccountAsync, GetAccountsAsync, GetAccountAsync, UpdateAccountAsync, DeleteAccountAsync - Settings/superuser/ownership: UpdateAccountSettingsAsync, UpdateSuperuserSettingsAsync, UpdateChownAsync - Typed read models: GetAccountSettingsTypedAsync, GetAccountResourcesTypedAsync Models: - Shared AccountQuota (12 max_* fields) reused by add/update - Enums for hostname_art, logging, statistic, kas_access_forbidden - Read models SubAccount, AccountSettings, AccountResources/AccountResource All parameters verified against the official phpdoc; response field shapes, the add_account scalar return and the get_accounts quota field naming quirk (max_databases/max_mail_list) verified live against a test account. 104 tests; builds clean on net8.0/net9.0/net10.0.
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.
Summary
Covers the KAS account-administration actions with typed models, mirroring the existing mailbox/forward style (
ToParameters()/FromMap(), DI, NUnit). Previously these were only reachable via the genericRequestAsyncescape hatch.New API
AddAccountAsync,GetAccountsAsync,GetAccountAsync,UpdateAccountAsync,DeleteAccountAsyncUpdateAccountSettingsAsync,UpdateSuperuserSettingsAsync,UpdateChownAsyncGetAccountSettingsTypedAsync,GetAccountResourcesTypedAsync(existing dict-returning methods stay — non-breaking)Models
AccountQuota(12max_*fields) reused by add/updatehostname_art,logging,statistic,kas_access_forbidden(tri-state)SubAccount,AccountSettings,AccountResources/AccountResourceVerification
add_accountreturns the generatedaccount_loginas a scalar; theget_accountsquota fields use names that differ from the request params (max_databases,max_mail_list) — documented onSubAccount