Commit Graph

87 Commits

Author SHA1 Message Date
Pascal Bleser
1408c3debc groupware: more API examples 2026-01-22 11:23:06 +01:00
Pascal Bleser
5d5dd031b9 API documentation changes for groupware-apidocs
* add example generator infrastructure, with some examples for pkg/jmap
   and pkg/groupware, with more needing to be done

 * alter the apidoc Makefile to stop using go-swagger but, instead, use
   the openapi.yml file that must be dropped into that directory using
   groupware-apidocs (will improve the integration there later)

 * add Makefile target to generate examples

 * bump redocly from 2.4.0 to 2.14.5

 * introduce Request.PathParam() and .PathParamDoc() to improve API
   documentation, as well as future-proofing

 * improve X-Request-ID and Trace-Id header handling in the middleware
   by logging it safely when an error occurs in the middleware
2026-01-22 09:42:24 +01:00
Pascal Bleser
073eec198e groupware: update to Stalwart 0.15.0 2026-01-22 09:42:24 +01:00
Pascal Bleser
1e6c97cefe groupware: improve email submission and testing
* jmap/EmailCreate: add more attributes that were omitted: Headers,
   InReplyTo, References, Sender

 * add jmap GetEmailSubmissionStatus

 * improve email integration tests by adding a thorough test for email
   submission

 * jmap integration tests: provision principals and domains using the
   Stalwart Management API, switching from an in-memory to an internal
   directory
2026-01-22 09:42:24 +01:00
Pascal Bleser
0b2bfb8b4f groupware: add retrieving and adding mailboxIds for drafts and sent if they are missing 2026-01-22 09:42:24 +01:00
Pascal Bleser
b5d3819455 groupware: WS push improvements, add getting email changes to WS integration test 2026-01-22 09:42:24 +01:00
Pascal Bleser
349bd20d57 groupware: JMAP WS push notifications support 2026-01-22 09:42:24 +01:00
Pascal Bleser
6cf7ed88cb groupware: fix email summaries and allow negative offsets
* fix a bug in how email summaries are flattened across multiple
   accounts, which was previous resulting in empty email objects

 * allow negative offset in email pagination

 * make all /emails endpoints return emails without bodies
2026-01-22 09:42:24 +01:00
Pascal Bleser
db5c2a18c6 groupware: feature test improvements and upgrade to Stalwart 0.14.1
* upgrade Stalwart image for devtools/full to 0.14.1

 * re-assert which features are implemented or not in 0.14.1

 * refactor the integration tests yet again to make it clearer and
   easier to see those "features-or-not"

 * get rid of old tests that are now better covered by integration tests

 * rewrite how we compare expected and actual objects in integration
   tests, finally having found a way to ignore the @type attribute
   properly instead of having to mutate all objects to remove it
2026-01-22 09:42:24 +01:00
Pascal Bleser
deee89d683 groupware: finalize JMAP events integration test, with multiple changes to the model to conform with draft-ietf-calext-jscalendarbis-10 and fields that are currently not implemented in Stalwart 2026-01-22 09:42:24 +01:00
Pascal Bleser
d788cee6d3 groupware: refactor the JMAP integration tests 2026-01-22 09:42:24 +01:00
Pascal Bleser
c24c187fbd groupware: improve JMAP ContactCard integration tests 2026-01-22 09:42:24 +01:00
Pascal Bleser
9270c68d3c groupware: improve JMAP integration tests for ContactCards 2026-01-22 09:42:24 +01:00
Pascal Bleser
e75c64b781 groupware: fix recently introduced error with UploadedBlob with and without a sha512 2026-01-22 09:42:24 +01:00
Pascal Bleser
6de0c7b036 groupware: fix blob uploading metadata and add 'POST /blobs' route 2026-01-22 09:42:24 +01:00
Pascal Bleser
c1de965871 groupware: add getting a contact by ID + add integration tests for contacts 2026-01-22 09:42:24 +01:00
Pascal Bleser
476b82d527 groupware: improved integration test for email, fixed two bugs 2026-01-22 09:42:24 +01:00
Pascal Bleser
c0415ff4dc groupware: fix deserialization of Event Alert Trigger types using mapstructure 2026-01-22 09:42:24 +01:00
Pascal Bleser
9a7b66e129 groupware: add real calendars and events 2026-01-22 09:42:24 +01:00
Pascal Bleser
a3033e48cd groupware: implement/fix email submission 2026-01-22 09:42:24 +01:00
Pascal Bleser
16a3168588 groupware: implement Mailbox modification endpoints + refactor ETag/state in the framework
* add endpoints for Mailboxes:
   - PATCH mailboxes/{id}
   - DELETE mailboxes/{id}
   - POST mailboxes

 * refactor the pkg/jmap and groupware framework to systematically
   return a jmap.State out-of-band of the per-method payloads, since
   they are almost always present in JMAP responses, which lead to the
   artificial creation of a lot of composed struct types just to also
   return the State; on the downside, it adds yet another return
   parameter
2026-01-22 09:42:24 +01:00
Pascal Bleser
f4420505bb groupware: add ical blob parsing endpoint 2026-01-22 09:42:24 +01:00
Pascal Bleser
1d998ec58d groupware: add Mailbox sorting 2026-01-22 09:42:24 +01:00
Pascal Bleser
93603b51d7 groupware: jmap: fix id -> blobId attribute when uploading a blob 2026-01-22 09:42:24 +01:00
Pascal Bleser
492f9b83f9 groupware: fix creating contacts 2026-01-22 09:42:24 +01:00
Pascal Bleser
127540bb2b groupware: actually add total and limit to the email summary endpoint 2026-01-22 09:42:24 +01:00
Pascal Bleser
f6d869b9ff groupware: fix compilation in tests after recent changes 2026-01-22 09:42:24 +01:00
Pascal Bleser
440e66ba42 groupware: add missing total,limit,offset attributes in the QueryEmailsSummaries response 2026-01-22 09:42:24 +01:00
Pascal Bleser
5d1709f439 groupware: add threadCount to /groupware/accounts/{accountId}/mailboxes/{mailboxId}/emails 2026-01-22 09:42:24 +01:00
Pascal Bleser
81cec702f3 groupware: add ContactCard operations 2026-01-22 09:42:24 +01:00
Pascal Bleser
5ae69edded groupware: add threadSize in email-by-id response 2026-01-22 09:42:23 +01:00
Pascal Bleser
6d434e245e groupware: introduce constants for Email property names, see EmailSummaryProperties 2026-01-22 09:42:23 +01:00
Pascal Bleser
438e35a089 groupware: fix keyword patching syntax for markAsSeen=true 2026-01-22 09:42:23 +01:00
Pascal Bleser
c230888d8a groupware: add threadSize property in the email summary endpoint 2026-01-22 09:42:23 +01:00
Pascal Bleser
1f550c30c3 groupware: add markAsSeen=true to mark an email as $seen before it is
retrieved
2026-01-22 09:42:23 +01:00
Pascal Bleser
f1d8d0f257 groupware: add searching emails by their Message-Id + retrieving an email by its ID as message/rfc822 2026-01-22 09:42:23 +01:00
Pascal Bleser
3c386dfd1d groupware: add identity deletion 2026-01-22 09:42:23 +01:00
Pascal Bleser
90e8470fbb groupware:
* made several email related operations multi-account:
   QueryEmailSnippets, QueryEmails, QueryEmailsWithSnippets

 * add GetIdentitiesForAllAccounts

 * add GetEmailsForAllAccounts

 * jmap: add CreateIdentity, UpdateIdentity; groupware: add
   GetIdentityById, AddIdentity, ModifyIdentity

 * add temporary workaround until Calendars, Tasks, Contacts are
   implemented in Stalwart when determining the default account for
   those: use the mail one in the mean time
2026-01-22 09:42:23 +01:00
Pascal Bleser
2258a57787 groupware: jmap: don't collpase threads when searching for emails, and add dumping of JMAP request payloads when trace logging is enabled 2026-01-22 09:42:23 +01:00
Pascal Bleser
097d4e98af jmap: add GetInboxNameForMultipleAccounts 2026-01-22 09:42:23 +01:00
Pascal Bleser
b74058dbbf jmap: fix Email/set 2026-01-22 09:42:23 +01:00
Pascal Bleser
3582a104bd groupware: improve jmap integration tests
* use gofakeit instead of loremipsum, as it can also fake images for
   attachments

 * random emails for testing: generate threads, add attachments
2026-01-22 09:42:23 +01:00
Pascal Bleser
e250ff63de groupware: rewrite JMAP integration test to be more reusable, and upgrade Stalwart container to 0.13.4 2026-01-22 09:42:23 +01:00
Pascal Bleser
d23d8cdf55 groupware: add bootstrapping on / with quotas for all accounts 2026-01-22 09:42:23 +01:00
Pascal Bleser
940cd81083 groupware: add /quota for all accounts 2026-01-22 09:42:23 +01:00
Pascal Bleser
deee6102ec groupware: add quota API + add support for Accept-Language and Content-Language 2026-01-22 09:42:22 +01:00
Pascal Bleser
5dc89de7ef groupware: add JMAP capability checking (in part: for contacts, calendars, tasks) 2026-01-22 09:42:22 +01:00
Pascal Bleser
d6e269abb8 groupware: add mock endpoints for tasklists and tasks 2026-01-22 09:42:22 +01:00
Pascal Bleser
55d521d15d groupware: implement JMAP Task specification 2026-01-22 09:42:22 +01:00
Pascal Bleser
5df0ec0e25 groupware: more mock data, added missing JMAP types 2026-01-22 09:42:22 +01:00