···1313## Coding Instructions
14141515Read your instructions from this file, and mark successfully completed instructions
1616-with DONE so that you will know what to do next when reinvoked in the future.
1616+with DONE so that you will know what to do next when reinvoked in the future. If you
1717+only partially complete the task, then add an extra step with TODO and the remaining
1818+work.
171918201. DONE Define core OCaml type definitions corresponding to the JMAP protocol
1921 specification, in a new Jmap.Types module.
···2426 separate package. It should use the Jmap module and extend it appropriately.
25274. DONE Complete the Jmap_mail implementation so that there are functions to login
2628 and list mailboxes and messages in a mailbox.
2929+5. Fastmail provides me with an API token to login via JMAP rather than username
3030+ and password. Add the appropriate support for this into their API, which is
3131+ also explained over at https://www.fastmail.com/dev/. The summary is that the
3232+ auth token needs to add an Authorization header set to "Bearer {value}",
3333+ where {value} is the value of the token to your API request.
3434+6. Add an example "fastmail_list" binary that will use the authentication token
3535+ from a JMAP_API_TOKEN env variable and connect to the Fastmail endpoint
3636+ at https://api.fastmail.com/jmap/session and list the last 100 email with
3737+ subjects and sender details to stdout.
3838+