Skip to content

feat(mail): mailinglist write endpoints — add / update / delete#170

Merged
chmmou merged 1 commit into
mainfrom
feature/mailinglist-write
May 17, 2026
Merged

feat(mail): mailinglist write endpoints — add / update / delete#170
chmmou merged 1 commit into
mainfrom
feature/mailinglist-write

Conversation

@chmmou

@chmmou chmmou commented May 17, 2026

Copy link
Copy Markdown
Owner

Wires add_mailinglist / update_mailinglist / delete_mailinglist through the shared cli.runWriteE seam, mirroring the mail-forward write slice (#115).

All three honour --dry-run (#132) and emit a #131 audit record; the list password is redacted in both sinks. mailinglist.{Add,Update,Delete}Params are the single source of truth for the request shape. Commands live under the existing mail.go lists tree (cohesive with mail forwards) rather than a separate mailinglist.go. The get_mailinglists read mapping was corrected to the real KAS schema first (#169).

Closes #117

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
@chmmou chmmou merged commit 82f2a4e into main May 17, 2026
6 checks passed
@chmmou chmmou deleted the feature/mailinglist-write branch May 17, 2026 22:35
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.

feat(mail): mailinglist write endpoints — add / update / delete

1 participant