feat(mail): mailinglist write endpoints — add / update / delete#170
Merged
Conversation
Wire add_mailinglist / update_mailinglist / delete_mailinglist through the shared cli.runWriteE seam, mirroring the mail-forward write slice: kasapi-cli mail lists add <name> --domain <d> --password <pw> kasapi-cli mail lists update <name> [--subscriber …] [--restrict-post …] [--config-file <path>] [--active] kasapi-cli mail lists delete <name> update and delete are gated by the #109 confirmation prompt (update_mailinglist replaces the subscriber / restrict-post / config fields wholesale); add is reversible and not prompted. All three honour --dry-run (#132) and emit a #131 audit record; the list password is redacted in both sinks. update sends only the explicitly-set flags (keyed on cobra Changed) so an empty value is a deliberate clear. mailinglist.{Add,Update,Delete}Params are the single source of truth for the request shape. Domain write methods + the fixture↔contract fault test mirror the mailforward slice; commands are registered under the existing mail.go forwards/lists tree rather than a separate mailinglist.go to keep the mail subtree cohesive. Closes #117
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.
Wires
add_mailinglist/update_mailinglist/delete_mailinglistthrough the sharedcli.runWriteEseam, mirroring the mail-forward write slice (#115).mail lists add <name> --domain <d> --password <pw>— reversible, not prompted.mail lists update <name> [--subscriber …] [--restrict-post …] [--config-file <path>] [--active]— gated (feat(cli): destructive-write confirmation infrastructure (--yes / interactive prompt) #109): replaces the subscriber/restrict-post/config fields wholesale. Only the explicitly-set flags are sent (cobraChanged), so an empty value is a deliberate clear.mail lists delete <name>— gated (feat(cli): destructive-write confirmation infrastructure (--yes / interactive prompt) #109).All three honour
--dry-run(#132) and emit a #131 audit record; the list password is redacted in both sinks.mailinglist.{Add,Update,Delete}Paramsare the single source of truth for the request shape. Commands live under the existingmail.golists tree (cohesive withmail forwards) rather than a separatemailinglist.go. Theget_mailinglistsread mapping was corrected to the real KAS schema first (#169).Closes #117