114 lines
3.3 KiB
Rust
114 lines
3.3 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct SquareHoleShapeOptionResponse {
|
|
pub option_id: String,
|
|
pub shape_kind: String,
|
|
pub label: String,
|
|
pub target_hole_id: String,
|
|
pub image_prompt: String,
|
|
#[serde(default)]
|
|
pub image_src: Option<String>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct SquareHoleHoleOptionResponse {
|
|
pub hole_id: String,
|
|
pub hole_kind: String,
|
|
pub label: String,
|
|
pub image_prompt: String,
|
|
#[serde(default)]
|
|
pub image_src: Option<String>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct PutSquareHoleWorkRequest {
|
|
pub game_name: String,
|
|
#[serde(default)]
|
|
pub theme_text: Option<String>,
|
|
pub twist_rule: String,
|
|
pub summary: String,
|
|
pub tags: Vec<String>,
|
|
#[serde(default)]
|
|
pub cover_image_src: Option<String>,
|
|
#[serde(default)]
|
|
pub background_prompt: Option<String>,
|
|
#[serde(default)]
|
|
pub background_image_src: Option<String>,
|
|
#[serde(default)]
|
|
pub shape_options: Option<Vec<SquareHoleShapeOptionResponse>>,
|
|
#[serde(default)]
|
|
pub hole_options: Option<Vec<SquareHoleHoleOptionResponse>>,
|
|
pub shape_count: u32,
|
|
pub difficulty: u32,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct RegenerateSquareHoleWorkImageRequest {
|
|
pub visual_asset_slot: String,
|
|
#[serde(default)]
|
|
pub visual_asset_option_id: Option<String>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct SquareHoleWorkSummaryResponse {
|
|
pub work_id: String,
|
|
pub profile_id: String,
|
|
pub owner_user_id: String,
|
|
#[serde(default)]
|
|
pub source_session_id: Option<String>,
|
|
pub game_name: String,
|
|
pub theme_text: String,
|
|
pub twist_rule: String,
|
|
pub summary: String,
|
|
pub tags: Vec<String>,
|
|
#[serde(default)]
|
|
pub cover_image_src: Option<String>,
|
|
#[serde(default)]
|
|
pub background_prompt: String,
|
|
#[serde(default)]
|
|
pub background_image_src: Option<String>,
|
|
#[serde(default)]
|
|
pub shape_options: Vec<SquareHoleShapeOptionResponse>,
|
|
#[serde(default)]
|
|
pub hole_options: Vec<SquareHoleHoleOptionResponse>,
|
|
pub shape_count: u32,
|
|
pub difficulty: u32,
|
|
pub publication_status: String,
|
|
pub play_count: u32,
|
|
pub updated_at: String,
|
|
#[serde(default)]
|
|
pub published_at: Option<String>,
|
|
pub publish_ready: bool,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct SquareHoleWorkProfileResponse {
|
|
#[serde(flatten)]
|
|
pub summary: SquareHoleWorkSummaryResponse,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct SquareHoleWorksResponse {
|
|
pub items: Vec<SquareHoleWorkSummaryResponse>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct SquareHoleWorkDetailResponse {
|
|
pub item: SquareHoleWorkProfileResponse,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct SquareHoleWorkMutationResponse {
|
|
pub item: SquareHoleWorkProfileResponse,
|
|
}
|