#756·himalaya

Publish structured JSON identities for Gmail draft create/update

Author: sridCreated Sep 19, 2026Updated Sep 19, 2026

himalaya --json gmail drafts create -- <message-file> and himalaya --json gmail drafts update <id> -- <message-file> currently print only a JSON-encoded human sentence such as Gmail draft `<id>` successfully created. Consumers must parse prose to recover the draft ID and cannot recover the returned message or thread IDs.

Please expose { "id": "…", "message-id": "…", "thread-id": "…" } under --json (thread-id nullable), derive JsonSchema, and publish himalaya-gmail-drafts-create.json and himalaya-gmail-drafts-update.json. Keep the existing human sentence for non-JSON output. Gmail already returns these identities from users.drafts.create/update.

A downstream consumer needs the draft id under --json. A working downstream patch implements these identities and checks the generated schemas against the built binary. This does not require draft send/list/delete support.

This is narrower than #749: it retains the existing Gmail-specific commands and only changes their JSON output.