Commit Graph

5 Commits

Author SHA1 Message Date
Fabien "egg" O'Carroll
9288f56649 Improved type definitions
The PostRepository type was using `any` (an anti pattern) rather than
`PostCollection`, and we had optional properties, which are not really
optional. This cleans up the types and updates the tests alongside them.
2023-07-27 16:33:16 +02:00
Naz
53f9f954c1 Added tag filter support to collections
refs https://github.com/TryGhost/Arch/issues/41

- When an new collection is created the relational "tags" filter is now picked up properly and appropriate posts matching the tag filter are assigned and stored in the collection. Example collection filter that is now supported: `tags:['bacon']`
- Additionally cleaned up returned collection post DTOs, so we return as little data as possible and add only the fields that are needed
2023-07-18 20:18:54 +08:00
Naz
3599cfdd7a
Added test coverage for collection updates
refs https://github.com/TryGhost/Team/issues/3170

- When the collection filter is updated the collection's posts should be updated automatically.
2023-06-05 16:23:02 +07:00
Naz
bfefcfd4df
Added automatic collection creation based on filter
refs https://github.com/TryGhost/Team/issues/3170

- This implementation allows to create an automatic collection with a filter defining automatically populated posts that belong to a collection
- To populate collection using a filter the API client can send a `filter` property along with a collection request
- Filter values are compatible with the filters used in Content API (https://ghost.org/docs/content-api/#filter)
2023-06-05 13:39:52 +07:00
Naz
66d489b8b3 Added Posts relation support to collections package
refs https://github.com/TryGhost/Team/issues/3260

- Adds "posts" relation to Collection entity to manage posts belonging to the collection
2023-05-31 22:55:35 +07:00