From 652b87d350909006105a87ad32ff8d443fdc6578 Mon Sep 17 00:00:00 2001 From: Pascal Bleser Date: Thu, 23 Apr 2026 17:28:12 +0200 Subject: [PATCH] groupware: add documentation for SearchResultsTemplate + update pnpm --- pkg/jmap/model.go | 22 +++++++++++++++++----- services/groupware/package.json | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/pkg/jmap/model.go b/pkg/jmap/model.go index 680d4619e8..84a5f3ea9f 100644 --- a/pkg/jmap/model.go +++ b/pkg/jmap/model.go @@ -1423,11 +1423,23 @@ type Changes[T Foo] interface { } type SearchResultsTemplate[T Foo] struct { - Results []T `json:"results"` - CanCalculateChanges bool `json:"canCalculateChanges"` - Position uint `json:"position"` - Limit uint `json:"limit,omitzero"` - Total *uint `json:"total,omitzero"` + // The list of objects that resulted from the query. + Results []T `json:"results"` + + // This is true if the server supports calling queryChanges with these filter/sort parameters. + // + // Note, this does not guarantee that the queryChanges call will succeed, as it may only be possible for a limited time + // afterwards due to server internal implementation details. + CanCalculateChanges bool `json:"canCalculateChanges"` + + // The pagination position that was requested using the `position` query parameter. + Position uint `json:"position"` + + // The maximum amount of results to return, as requested using the `limit` query parameter. + Limit uint `json:"limit,omitzero"` + + // The total amount of results that exist for the query. + Total *uint `json:"total,omitzero"` } type SearchResults[T Foo] interface { diff --git a/services/groupware/package.json b/services/groupware/package.json index 27a1a9bb3b..2204122853 100644 --- a/services/groupware/package.json +++ b/services/groupware/package.json @@ -7,7 +7,7 @@ "ts-node": "^10.9.2", "typescript": "^5.9.3" }, - "packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319", + "packageManager": "pnpm@10.33.2+sha512.a90faf6feeab71ad6c6e57f94e0fe1a12f5dcc22cd754db40ae9593eb6a3e0b6b12e3540218bb37ae083404b1f2ce6db2a4121e979829b4aff94b99f49da1cf8", "type": "module", "devDependencies": { "@types/node": "^24.10.15"