Files
emails/NOTES.md
2023-06-09 00:54:34 -04:00

44 lines
1.9 KiB
Markdown

## UI
* [x] List `mailboxes` all in the `Email Provider`, identifying those *registered* locally.
* [x] Select which to *register* or unregister for watching.
* [x] List *registered* `mailboxes`.
* [x] List `messages` for selected `mailbox`.
* [x] Schedule `attachments` downloads.
* [ ] Download `attachments` (*encrypted* & *decrypted*).
## CLI
#### Automatic
* [x] `mailboxes:check`: Get *registered* `mailboxes` and schedule `messages:grab` for `mailbox_id`.
* [x] `attachments:check`: Check *saved* `attachments` and schedule `attachments:decrypt` for `attachment_id`.
* [x] `jobs:check`: Get *pending* `jobs` and run them.
#### Scheduled
* [x] `messages:grab`: Grab `messages` for `mailbox`. Arguments: `mailbox_id`.
* [x] `attachments:grab`: Grab `attachments` for `message`. Arguments: `message_id`.
* [x] `attachments:decrypt`: Decrypt `attachment`. Arguments: `attachment_id`.
## API
* [x] Grab all `mailboxes` from `Email Provider`, identifying those that are registered.
* [x] Register `mailboxes` into **[database]** and grab latest `messages`.
* [x] Grab new `messages` from `Email Provider` for selected `mailboxes` and store them in the `database`.
* [x] Grab `messages` from **[database]** for selected `mailboxes`.
* [x] Grab `attachments` from `Email Provider` for selected `messages`.
* [x] Register `messages` for `attachment` job.
* [x] Decrypt `attachments`.
## Workflow
* **[User]** Choose `mailboxes` to register or unregister.
-> **[API]** Register selected `mailboxes`, register new `messages:grab` job.
* **[Cron]** Get `jobs`, run `jobs`.
* **[User]** Check messages found -> **[API]** Schedule `attachments`.
## Jobs
#### Automatic
* [x] Check *registered* `mailboxes` for new `messages`. Every weekday.
* [x] Check if `attachments` are *encrypted*. Every weekday.
* [x] Check for new *scheduled* `jobs`. Every minute.
#### Scheduled
* [ ] Grab `messages` for `mailbox` id.
* [ ] Grab `attachments` for `message` id.
* [ ] Decrypt `attachment`.