groupware: refactor responses to a jmap.Response object

* in the JMAP API as well as in several places in the Groupware
   framework, use a single jmap.Response[T] object to return the
   payload, the language, the session state and the etag/state instead
   of individual multi-valued return values
This commit is contained in:
Pascal Bleser
2026-04-29 14:58:26 +02:00
parent 673e337729
commit dfd8677b93
42 changed files with 827 additions and 719 deletions

View File

@@ -27,7 +27,7 @@ func (j *Client) GetObjects(accountId string, //NOSONAR
quotaIds []string, identityIds []string,
emailSubmissionIds []string,
ctx Context,
) (Objects, SessionState, State, Language, Error) {
) (Result[Objects], Error) {
l := j.logger("GetObjects", ctx).With()
if len(mailboxIds) > 0 {
l = l.Array("mailboxIds", log.SafeStringArray(mailboxIds))
@@ -90,7 +90,7 @@ func (j *Client) GetObjects(accountId string, //NOSONAR
cmd, err := j.request(ctx, NS_OBJECTS, methodCalls...)
if err != nil {
return Objects{}, "", "", "", err
return ZeroResult[Objects](), err
}
return command(j, ctx, cmd, func(body *Response) (Objects, State, Error) {