use crate::endpoints::Endpoint;
use crate::types::note::{NoteListFilter, PackNoteMaybeFull};
use http::Method;
use magnetar_sdk_macros::Endpoint;
use serde::{Deserialize, Serialize};
use ts_rs::TS;

// Get timeline notes
#[derive(Serialize, Deserialize, TS)]
#[ts(export)]
pub struct GetTimelineReq {
    #[ts(optional)]
    pub filter: Option<NoteListFilter>,
}

#[derive(Endpoint)]
#[endpoint(
    endpoint = "/timeline/:timeline_type",
    method = Method::GET,
    request = "GetTimelineReq",
    response = "Vec<PackNoteMaybeFull>",
    paginated = true
)]
pub struct GetTimeline;
