floopy/types/feedback.rs
1use serde::{Deserialize, Serialize};
2
3/// Arguments for [`crate::resources::Feedback::submit`].
4#[derive(Debug, Clone, Serialize)]
5pub struct FeedbackSubmitParams {
6 /// User rating (e.g. 0-10 / NPS-style).
7 pub score: i32,
8 /// Whether the response was useful.
9 pub useful: bool,
10 /// Optional; defaults to the most recent session for the key.
11 #[serde(skip_serializing_if = "Option::is_none")]
12 pub session_id: Option<String>,
13}
14
15/// Response from [`crate::resources::Feedback::submit`].
16#[derive(Debug, Clone, Deserialize)]
17pub struct FeedbackSubmitResponse {
18 /// `true` when feedback for this session was already recorded.
19 pub duplicate: bool,
20 /// The session the feedback was attached to.
21 #[serde(default)]
22 pub session_id: Option<String>,
23}