Commit Graph

15 Commits

Author SHA1 Message Date
Pascal Bleser
4c1aadde85 groupware: add ContactCard operations 2026-02-23 09:38:08 +01:00
Pascal Bleser
1109184866 groupware: jmap: don't collpase threads when searching for emails, and add dumping of JMAP request payloads when trace logging is enabled 2026-02-23 09:37:29 +01:00
Pascal Bleser
59d3290dbf jmap: fix Email/set 2026-02-23 09:37:29 +01:00
Pascal Bleser
4298f40949 groupware: add quota API + add support for Accept-Language and Content-Language 2026-02-23 09:37:29 +01:00
Pascal Bleser
b94f123b96 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-02-23 09:37:28 +01:00
Pascal Bleser
a3566e0ff7 refactor(groupware): session cache and DNS autodiscovery
* move the logging of the username and session state away from pkg/jmap
   and into services/groupware

 * introduce more decoupling for the session cache, as well as moving
   the implementation into groupware_session.go
2026-02-23 09:34:45 +01:00
Pascal Bleser
56831fd973 groupware: session handling improvements
* remove the baseurl from the JMAP client configuration, and pass it to
   the session retrieval functions instead, as that is really the only
   place where it is relevant, and we gain flexibility to discover that
   session URL differently in the future without having to touch the
   JMAP client

 * move the default account identifier handling from the JMAP package to
   the Groupware one, as it really has nothing to do with JMAP itself,
   and is an opinionated feature of the Groupware REST API instead

 * add an event listener interface for JMAP events to be more flexible
   and universal, typically for metrics that are defined on the API
   level that uses the JMAP client

 * add errors for when default accounts cannot be determined

 * split groupware_framework.go into groupware_framework.go,
   groupware_request.go and groupware_response.go

 * move the accountId logging into the Groupware level instead of JMAP
   since it can also be relevant to other operations that might be
   worthy of logging before the JMAP client is even invoked
2026-02-23 09:34:45 +01:00
Pascal Bleser
bf7b8d7868 groupware: jmap: add metrics 2026-02-23 09:34:45 +01:00
Pascal Bleser
9342db5efb groupware: blob streaming (upload and download) 2026-02-23 09:34:45 +01:00
Pascal Bleser
ee72727410 groupware: further implementation and improvements 2026-02-23 09:34:45 +01:00
Pascal Bleser
967ad602a9 groupware: refactoring the API mechanisms 2026-02-23 09:34:45 +01:00
Pascal Bleser
892fe602d5 groupware: implement JSON:API's error response format, with a revamped error handling in jmap and services/groupware 2026-02-23 09:34:45 +01:00
Pascal Bleser
bc333500cd Refactor groupware service after ADR decision on the Groupware API
* after having decided that the Groupware API should be a standalone
   independent custom REST API that is using JMAP data models as much as
   possible,
 * removed Groupware APIs from the Graph service
 * moved Groupware implementation to the Groupware service, and
   refactored a few things accordingly
2026-02-23 09:34:45 +01:00
Pascal Bleser
eba724249c Groupware and jmap: cleanup and API documentation 2026-02-23 09:34:45 +01:00
Pascal Bleser
a29108f37e Groupware improvements: refactoring, k6 tests
* refactored the models to be strongly typed with structs and mapstruct
   to decompose the dynamic parts of the JMAP payloads

 * externalized large JSON strings for tests into .json files under
   testdata/

 * added a couple of fantasy Graph groupware APIs to explore further
   options

 * added k6 scripts to test those graph/me/messages APIs, with a setup
   program to set up users in LDAP, fill their IMAP inbox, activate them
   in Stalwart, cleaning things up, etc...
2026-02-23 09:34:45 +01:00