Ghost/ghost
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
..
adapter-manager Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
admin Improved filter support in activity API to allow pagination (#15684) 2022-10-27 12:13:24 +02:00
api-framework Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
api-version-compatibility-service Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
audience-feedback Updated feedback button links (#15701) 2022-10-26 18:04:11 +02:00
bootstrap-socket Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
constants Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
core Improved filter support in activity API to allow pagination (#15684) 2022-10-27 12:13:24 +02:00
custom-theme-settings-service Added linking between member and subscription created events (#15693) 2022-10-27 11:44:19 +02:00
data-generator Added command to generate demo data (#15691) 2022-10-26 17:55:08 +01:00
domain-events Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
email-analytics-provider-mailgun Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
email-analytics-service Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
email-content-generator Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
express-dynamic-redirects Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
extract-api-key Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
html-to-plaintext Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
job-manager Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
link-redirects Added X-Robots-Tag header to redirect responses (#15700) 2022-10-27 10:07:36 +07:00
link-replacer Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
link-tracking Added linking between member and subscription created events (#15693) 2022-10-27 11:44:19 +02:00
magic-link Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
mailgun-client Update dependency mailgun.js to v8.0.2 2022-10-25 20:20:41 +00:00
member-analytics-service Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
member-attribution Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
member-events Added linking between member and subscription created events (#15693) 2022-10-27 11:44:19 +02:00
members-analytics-ingress Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
members-api Improved filter support in activity API to allow pagination (#15684) 2022-10-27 12:13:24 +02:00
members-csv Restricted members importer to ignore "products" column 2022-10-24 18:06:02 +08:00
members-events-service Added linking between member and subscription created events (#15693) 2022-10-27 11:44:19 +02:00
members-importer Migrated members importer to use tiers 2022-10-26 14:26:21 +08:00
members-ssr Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
minifier Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
mw-api-version-mismatch Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
mw-cache-control Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
mw-error-handler Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
mw-session-from-token Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
mw-update-user-last-seen Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
mw-vhost Update dependency supertest to v6.3.1 2022-10-26 02:54:43 +00:00
oembed-service Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
offers Added linking between member and subscription created events (#15693) 2022-10-27 11:44:19 +02:00
package-json Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
payments Wired up Payments service to new Tiers package 2022-10-25 09:02:41 +07:00
portal Updated feedback button links (#15701) 2022-10-26 18:04:11 +02:00
referrers Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
security Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
session-service Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
settings-path-manager Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
staff-service Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
stats-service Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
stripe Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
tiers Migrated members importer to use tiers 2022-10-26 14:26:21 +08:00
update-check-service Updated @tryghost dependencies (#15631) 2022-10-24 10:30:40 +07:00
verification-trigger Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
version-notifications-data-service Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00