manabrew_protocol/prompts/
reorder.rs1use serde::{Deserialize, Serialize};
2use ts_rs::TS;
3
4use crate::game::CardDto;
5use crate::prompts::common::PromptPresentation;
6
7#[derive(Debug, Clone, Serialize, Deserialize, TS)]
8#[serde(rename_all = "camelCase")]
9#[ts(export, export_to = "prompts/reorder.ts")]
10pub struct ReorderItem {
11 pub id: String,
12 pub card: CardDto,
13 #[serde(default, skip_serializing_if = "Option::is_none")]
14 #[ts(optional)]
15 pub oracle: Option<String>,
16}
17
18#[derive(Debug, Clone, Serialize, Deserialize, TS)]
19#[serde(rename_all = "camelCase")]
20#[ts(export, export_to = "prompts/reorder.ts")]
21pub struct ReorderInput {
22 pub presentation: PromptPresentation,
23 pub items: Vec<ReorderItem>,
24}
25
26#[derive(Debug, Clone, Serialize, Deserialize, TS)]
27#[serde(
28 tag = "type",
29 rename_all = "camelCase",
30 rename_all_fields = "camelCase"
31)]
32#[ts(export, export_to = "prompts/reorder.ts")]
33pub enum ReorderOutput {
34 ReorderDecision { ordered_ids: Vec<String> },
35}