feat(recent): add cursor + groupby support

This commit is contained in:
Edouard Vanbelle
2026-05-28 11:50:32 +02:00
parent bd474aa67e
commit 73e78904e7
15 changed files with 1205 additions and 181 deletions
+11
View File
@@ -51,4 +51,15 @@ pub trait RecentItemsRepositoryPort: Send + Sync + 'static {
/// Removes items exceeding `max_items` (the oldest ones).
async fn prune(&self, user_id: Uuid, max_items: i32) -> Result<()>;
/// List recent items with cursor pagination, sorting, and optional type filter.
async fn list_resources_paged(
&self,
user_id: Uuid,
limit: usize,
cursor: Option<&crate::application::dtos::recent_dto::RecentCursor>,
order_by: &str,
kinds: Option<&[crate::domain::services::authorization::ResourceKind]>,
reverse: bool,
) -> Result<Vec<crate::application::dtos::recent_dto::RecentResourceRow>>;
}