Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
44d0275
Implement getGroups v3 api
mladen-inabyte Dec 10, 2025
a3caa1b
Finish the feature and resolve vulnerabilities
mladen-inabyte Dec 11, 2025
df56489
Additional fixes for membership status filter
mladen-inabyte Dec 12, 2025
9796dfa
Fix docs
mladen-inabyte Dec 15, 2025
7fcc5e3
Additonal api doc fix
mladen-inabyte Dec 15, 2025
e551b03
Changelog
mladen-inabyte Dec 15, 2025
d475462
Fix array out of bound
mladen-inabyte Dec 15, 2025
c1d7f2d
Changelog
mladen-inabyte Dec 15, 2025
94d6556
Merge branch 'develop' into 613-group-filters-improvements
mladen-inabyte Dec 15, 2025
18b498d
Fix docs
mladen-inabyte Dec 15, 2025
0b65242
Changelog
mladen-inabyte Dec 15, 2025
681fc0f
Merge branch 'develop' into 613-group-filters-improvements
mladen-inabyte Dec 15, 2025
7c0031f
Merge branch 'develop' into 613-group-filters-improvements
mladen-inabyte Dec 16, 2025
da94fdf
Redo api doc
mladen-inabyte Dec 16, 2025
6e4eaf9
Fix build and update libraries and go version
mladen-inabyte Dec 16, 2025
ebf3eee
Update apis and regenerate docs
mladen-inabyte Dec 16, 2025
95318ac
Changelog
mladen-inabyte Dec 16, 2025
464b986
Fix member_status field
mladen-inabyte Dec 16, 2025
e0c6b48
Merge branch 'develop' into 613-group-filters-improvements
mladen-inabyte Dec 16, 2025
106dbb5
Fix deviation between groups filtering and stats logic
mladen-inabyte Dec 17, 2025
b850e17
fix limit
mladen-inabyte Dec 17, 2025
d3be0c2
fix wrong type
mladen-inabyte Dec 17, 2025
8ee69aa
Handle additional 5 records if limit_id presents
mladen-inabyte Dec 17, 2025
f58b4a9
Changelog
mladen-inabyte Dec 17, 2025
a0f6f2f
More improvements
mladen-inabyte Dec 17, 2025
8be4565
Update apidoc
mladen-inabyte Dec 17, 2025
1e499f7
Merge branch 'develop' into 613-group-filters-improvements
mladen-inabyte Dec 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased


## [1.73.5] - 2025-12-17
### Fixed
- USABILITY UI CleanUp: Group Filters - API improvements. Additional fixes[#613](https://github.com/rokwire/groups-building-block/issues/613)

## [1.73.4] - 2025-12-17
### Fixed
- USABILITY UI CleanUp: Group Filters - API improvements. Additional fixes[#613](https://github.com/rokwire/groups-building-block/issues/613)
Expand Down
47 changes: 24 additions & 23 deletions core/model/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,30 @@ type MembershipFilter struct {

// GroupsFilter Wraps all possible filters for getting a group
type GroupsFilter struct {
GroupIDs []string `json:"ids"` // membership id
MemberID *string `json:"member_id"` // member id
MemberUserID *string `json:"member_user_id"` // member user id
MemberExternalID *string `json:"member_external_id"` // member user external id
MemberStatus []string `json:"member_status"` // member user status
Title *string `json:"title"` // group title
Category *string `json:"category"` // group category
Privacy *string `json:"privacy"` // group privacy
Tags []string `json:"tags"` // group tags
IncludeHidden *bool `json:"include_hidden"` // Include hidden groups
Hidden *bool `json:"hidden"` // Filter by hidden flag. Values: true (show only hidden), false (show only not hidden), missing - don't do any filtering on this field.
ExcludeMyGroups *bool `json:"exclude_my_groups"` // Exclude My groups
AuthmanEnabled *bool `json:"authman_enabled"`
ResearchOpen *bool `json:"research_open"`
ResearchGroup *bool `json:"research_group"`
ResearchAnswers map[string]map[string][]string `json:"research_answers"`
Attributes map[string]interface{} `json:"attributes"`
Order *string `json:"order"` // order by category & name (asc desc)
Offset *int64 `json:"offset"` // result offset
Limit *int64 `json:"limit"` // result limit
LimitID *string `json:"limit_id"` // limit id
DaysInactive *int64 `json:"days_inactive"`
Administrative *bool `json:"administrative"`
GroupIDs []string `json:"ids"` // membership id
MemberID *string `json:"member_id"` // member id
MemberUserID *string `json:"member_user_id"` // member user id
MemberExternalID *string `json:"member_external_id"` // member user external id
MemberStatus []string `json:"member_status"` // member user status
Title *string `json:"title"` // group title
Category *string `json:"category"` // group category
Privacy *string `json:"privacy"` // group privacy
Tags []string `json:"tags"` // group tags
IncludeHidden *bool `json:"include_hidden"` // Include hidden groups
Hidden *bool `json:"hidden"` // Filter by hidden flag. Values: true (show only hidden), false (show only not hidden), missing - don't do any filtering on this field.
ExcludeMyGroups *bool `json:"exclude_my_groups"` // Exclude My groups
AuthmanEnabled *bool `json:"authman_enabled"`
ResearchOpen *bool `json:"research_open"`
ResearchGroup *bool `json:"research_group"`
ResearchAnswers map[string]map[string][]string `json:"research_answers"`
Attributes map[string]interface{} `json:"attributes"`
Order *string `json:"order"` // order by category & name (asc desc)
Offset *int64 `json:"offset"` // result offset
Limit *int64 `json:"limit"` // result limit
LimitID *string `json:"limit_id"` // limit id
LimitIDExtraRecords *int64 `json:"limit_id_extra_records"` // limit id number of extra records, default 0
DaysInactive *int64 `json:"days_inactive"`
Administrative *bool `json:"administrative"`
} // @name GroupsFilter

// PostsFilter Wraps all possible filters for getting group post call
Expand Down
168 changes: 167 additions & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4532,6 +4532,168 @@ const docTemplate = `{
}
}
},
"/api/v2/groups": {
"get": {
"security": [
{
"AppUserAuth": []
}
],
"description": "Gives the groups list. It can be filtered by category, title and privacy. V2",
"consumes": [
"application/json"
],
"tags": [
"Client"
],
"operationId": "GetGroupsV2",
"parameters": [
{
"type": "string",
"description": "APP",
"name": "APP",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! Filtering by group's title (case-insensitive)",
"name": "title",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! category - filter by category",
"name": "category",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! privacy - filter by privacy",
"name": "privacy",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! offset - skip number of records",
"name": "offset",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! limit - limit the result",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! include_hidden - Includes hidden groups if a search by title is performed. Possible value is true. Default false.",
"name": "include_hidden",
"in": "query"
},
{
"description": "body data",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/GroupsFilter"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Group"
}
}
}
}
},
"post": {
"security": [
{
"AppUserAuth": []
}
],
"description": "Gives the groups list. It can be filtered by category, title and privacy. V2",
"consumes": [
"application/json"
],
"tags": [
"Client"
],
"operationId": "GetGroupsV2",
"parameters": [
{
"type": "string",
"description": "APP",
"name": "APP",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! Filtering by group's title (case-insensitive)",
"name": "title",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! category - filter by category",
"name": "category",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! privacy - filter by privacy",
"name": "privacy",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! offset - skip number of records",
"name": "offset",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! limit - limit the result",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Deprecated - instead use request body filter! include_hidden - Includes hidden groups if a search by title is performed. Possible value is true. Default false.",
"name": "include_hidden",
"in": "query"
},
{
"description": "body data",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/GroupsFilter"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Group"
}
}
}
}
}
},
"/api/v2/groups/{id}": {
"get": {
"security": [
Expand Down Expand Up @@ -5430,6 +5592,10 @@ const docTemplate = `{
"description": "limit id",
"type": "string"
},
"limit_id_extra_records": {
"description": "limit id number of extra records, default 0",
"type": "integer"
},
"member_external_id": {
"description": "member user external id",
"type": "string"
Expand All @@ -5438,7 +5604,7 @@ const docTemplate = `{
"description": "member id",
"type": "string"
},
"member_statuses": {
"member_status": {
"description": "member user status",
"type": "array",
"items": {
Expand Down
Loading