use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct StartSquareHoleRunRequest { pub profile_id: String, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct DropSquareHoleShapeRequest { #[serde(default)] pub run_id: Option, pub hole_id: String, pub client_snapshot_version: u64, pub client_event_id: String, pub dropped_at_ms: u64, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct StopSquareHoleRunRequest { pub client_action_id: String, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct SquareHoleShapeSnapshotResponse { pub shape_id: String, pub shape_kind: String, pub label: String, pub target_hole_id: String, pub color: String, #[serde(default)] pub image_src: Option, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct SquareHoleHoleSnapshotResponse { pub hole_id: String, pub hole_kind: String, pub label: String, pub x: f32, pub y: f32, #[serde(default)] pub image_src: Option, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct SquareHoleDropFeedbackResponse { pub accepted: bool, #[serde(default)] pub reject_reason: Option, pub message: String, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct SquareHoleRunSnapshotResponse { pub run_id: String, pub profile_id: String, pub owner_user_id: String, pub status: String, pub snapshot_version: u64, pub started_at_ms: u64, pub duration_limit_ms: u64, pub remaining_ms: u64, pub total_shape_count: u32, pub completed_shape_count: u32, pub combo: u32, pub best_combo: u32, pub score: u32, pub rule_label: String, #[serde(default)] pub background_image_src: Option, #[serde(default)] pub current_shape: Option, pub holes: Vec, #[serde(default)] pub last_feedback: Option, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct SquareHoleRunResponse { pub run: SquareHoleRunSnapshotResponse, } #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "camelCase")] pub struct SquareHoleDropResponse { pub feedback: SquareHoleDropFeedbackResponse, pub run: SquareHoleRunSnapshotResponse, }