panorama/docs/daemon/api.md

34 lines
737 B
Markdown
Raw Normal View History

2021-11-04 11:30:35 +00:00
# Daemon API
To communicate with the daemon start by connecting to the socket it exposes.
This opens a long-lasting connection that can be used to send RPC messages. The
following messages are planned:
#### `mail::listen-receive`
```
(account : Option<String>) -> Stream<MessageNotification>
```
Begin subscribing to when mail is received for a particular account if provided,
or all accounts by default.
#### `mail::send`
```
(message : SendMessage) -> Result<()>
```
Send an email. If the send fails the result is returned immediately without
retry.
TODO: send with retry?
#### `mail::search`
```
(query : StructuredQuery) -> Result<SearchResultPage>
```
Search for messages, returns a summary of messages + first sentence.