Commit Graph

15 Commits

Author SHA1 Message Date
Pascal Bleser
4bee5f01f5 structs: add tests and documentation 2026-04-30 10:51:45 +02:00
Pascal Bleser
67ec7a5547 groupware: significant refactorings of the JMAP framework, adding methods and more intelligence to the various request and response types to improve the use of template functions, reducing the risks of typos and copy/paste mistakes 2026-04-30 10:51:45 +02:00
Pascal Bleser
289c9678a9 groupware: add retrieving and adding mailboxIds for drafts and sent if they are missing 2026-04-30 10:51:44 +02:00
Pascal Bleser
c16ba3ac4a groupware: WS push improvements, add getting email changes to WS integration test 2026-04-30 10:51:43 +02:00
Pascal Bleser
ba30c1be87 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-04-30 10:51:43 +02:00
Pascal Bleser
0eb6dce8fd groupware: improve JMAP ContactCard integration tests 2026-04-30 10:51:43 +02:00
Pascal Bleser
0d52b9a812 groupware: improve JMAP integration tests for ContactCards 2026-04-30 10:51:43 +02:00
Pascal Bleser
b9bce2fb70 groupware: add getting a contact by ID + add integration tests for contacts 2026-04-30 10:51:43 +02:00
Pascal Bleser
e8ebbecadf groupware: implement/fix email submission 2026-04-30 10:51:43 +02:00
Pascal Bleser
545f98e7d7 groupware: add identity deletion 2026-04-30 10:51:42 +02:00
Pascal Bleser
9901fa74c9 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-04-30 10:51:42 +02:00
Pascal Bleser
d74560e940 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-04-30 10:51:42 +02:00
Pascal Bleser
0e8bbe7038 groupware: add /bootstrap
* add a GET /accounts/{a}/boostrap URI that delivers the same as GET /
   but also mailboxes for a given account, in case the UI remembers the
   last used account identifier, to avoid an additional roundtrip

 * streamline the use of simpleError()

 * add logging of errors at the calling site

 * add logging of evictions of Sessions from the cache

 * change default Session cache TTL to 5min instead of 30sec
2026-04-30 10:51:41 +02:00
Pascal Bleser
304bbe2fa6 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-04-30 10:51:41 +02:00
Jörn Friedrich Dreyer
b07b5a1149 use plain pkg module
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 16:42:19 +01:00