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

// Get note by id
#[derive(Serialize, Deserialize, TS)]
#[ts(export)]
pub struct NoteByIdReq {
    #[ts(optional)]
    pub context: Option<bool>,
    #[ts(optional)]
    pub attachments: Option<bool>,
}

#[derive(Endpoint)]
#[endpoint(
    endpoint = "/notes/:id",
    method = Method::GET,
    request = "NoteByIdReq",
    response = "PackNoteMaybeFull"
)]
pub struct GetNoteById;
