Commit Graph

7 Commits

Author SHA1 Message Date
Pascal Bleser
6db8dd3956 start websocket implementation, add endpoint for email summaries
* feat(groupware): start implementing JMAP websocket support for push
   notifications (unfinished)

 * groupware: add GetLatestEmailsSummaryForAllAccounts

 * add new vendored dependency: github.com/gorilla/websocket

 * jmap: add QueryEmailSummaries

 * openapi: start adding examples

 * openapi: add new tooling for api-examples.yaml injection

 * apidoc-process.ts: make it more typescript-y

 * bump @redocly/cli from 2.0.8 to latest 2.2.0
2026-01-22 09:42:22 +01:00
Pascal Bleser
299a356076 fix(groupware): fix JMAP error handling
* the JMAP error handling was not working properly, fixed it and added
   error definitions accordingly

 * add operations to retrieve mailbox roles and mailboxes by role for
   all accounts
2026-01-22 09:42:22 +01:00
Pascal Bleser
b0768ae4b5 refactor(groupware): add max requests check
* move jmap.request() to jmap.Client.request() and pass the Session
   and a Logger to introduce checking the number of methodCalls within a
   request not exceeding the limit of the Session, as well as error
   handling and logging there instead of in each caller

 * a few bugfixes:
   - add a few missing Send() calls in logs
   - correct the response tag matching for
     GetMailboxChangesForMultipleAccounts
   - fix typo in Identity.ReplyTo json serialization rune
   - fix response tag in pkg/jmap/testdata/mailboxes1.json after
     changing them to be prefixed by the accountId
2026-01-22 09:42:22 +01:00
Pascal Bleser
eab949ba68 groupware: initial related emails implementation with SSE 2026-01-22 09:39:16 +01:00
Pascal Bleser
7a1ee6e19b Groupware improvements
* ensure that all the jmap responses contain the SessionState

 * implement missing errors that were marked as TODO

 * moved common functions from pkg/jmap and pkg/services/groupware to
   pkg/log and pkg/structs to commonalize them across both source trees

 * implement error handling for SetError occurences

 * Email: replace anonymous map[string]bool for mailbox rights with a
   MailboxRights struct, as the keys are well-defined, which allows for
   properly documenting them

 * introduce ObjectType as an "enum"

 * fix JSON marshalling and unmarshalling of EmailBodyStructure

 * move the swagger documentation structs from groupware_api.go to
   groupware_docs.go

 * fix: change verb for /groupware/accounts/*/vacation from POST to PUT
2026-01-22 09:39:16 +01:00
Pascal Bleser
4dcbb5d8e3 groupware: further implementation and improvements 2026-01-22 09:39:15 +01:00
Pascal Bleser
80b31a8574 groupware: implement JSON:API's error response format, with a revamped error handling in jmap and services/groupware 2026-01-22 09:39:15 +01:00