Ghost/ghost/core/test/e2e-api
Simon Backx b911208b41
Improved filter support in activity API to allow pagination (#15684)
fixes https://github.com/TryGhost/Team/issues/2129

- This changes how the activity feed API parses the filter.
- We now parse the filter early to a MongoDB filter, and split it in two. One of the filters is applied to the pageActions, and the other one is used individually for every event type. We now allow to use grouping and OR's inside the filters because of this change. As long as we don't combine filters on 'type' with other filters inside grouped filters or OR, then it is allowed.
- We make use of mongoTransformer to manually inject a mongo filter without needing to parse it from a string value again (that would make it a lot harder because we would have to convert the splitted filter back to a string and we currently don't have methods for that).
- Added sorting by id for events with the same timestamp (required for reliable pagination)
- Added id to each event (required for pagination)
- Added more tests for filters
- Added test for pagination
- Removed unsued getSubscriptions and getVolume methods

Used new mongo utility methods introduced here: https://github.com/TryGhost/NQL/pull/49
2022-10-27 12:13:24 +02:00
..
admin Improved filter support in activity API to allow pagination (#15684) 2022-10-27 12:13:24 +02:00
content Wired up Tiers service to Tiers Content & Admin API 2022-10-25 09:02:59 +07:00
members Added linking between member and subscription created events (#15693) 2022-10-27 11:44:19 +02:00
members-comments Added temporary fix for random test failures in comments 2022-09-14 17:02:13 +02:00
shared Increased Vary granularity for versioned requests 2022-09-28 14:48:43 +08:00