Commit Graph

10 Commits

Author SHA1 Message Date
Pascal Bleser
55424b6317 groupware: add strongly typed aliases for AccountId, PrincipalId and SupplierId
Purpose is to make APIs and parameters easier to understand, since plain
strings are used all over the place for all sorts of identifiers.
2026-07-01 14:57:31 +02:00
Pascal Bleser
c8a02f5c9b groupware: fix use of ?limit=0
* JMAP query limit of 0 is synonymous with "no limit", but we actually
   want to be able to perform queries without any results, for cases
   where we only want to count the total number of objects, and also
   because it makes more sense semantically

 * introduce query parameter validation checks, in order to only allow
   query parameters that are actually supported, which is going to be
   useful during development of clients
2026-07-01 14:57:31 +02:00
Pascal Bleser
911ab62d72 structs: add tests and documentation 2026-07-01 14:57:31 +02:00
Pascal Bleser
cf90246170 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-07-01 14:57:29 +02:00
Pascal Bleser
6c6ba244d8 groupware: improve JMAP ContactCard integration tests 2026-07-01 14:57:29 +02:00
Pascal Bleser
a495f8170d groupware: improve JMAP integration tests for ContactCards 2026-07-01 14:57:29 +02:00
Pascal Bleser
ca5802da67 groupware: add identity deletion 2026-07-01 14:57:28 +02:00
Pascal Bleser
d41cd055e4 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-07-01 14:56:56 +02:00
Pascal Bleser
350b9e8b76 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-07-01 14:56:56 +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