1use schema_loader::{id_schema, script_schema};
2use schemars::JsonSchema;
3
4use serde::{Deserialize, Serialize};
5use tsify_next::{Tsify, declare};
6use uuid::Uuid;
7
8#[declare]
9pub type CheatScriptId = Uuid;
10
11#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, Tsify)]
12pub struct CheatScript {
13 #[schemars(schema_with = "id_schema")]
14 pub id: CheatScriptId,
15
16 #[schemars(
17 title = "Скрипт чита, возвращающий набор эвентов",
18 schema_with = "script_schema"
19 )]
20 pub script: String,
21}
22
23#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, Tsify)]
24pub struct TestPlayerScript {
25 #[schemars(schema_with = "id_schema")]
26 pub id: Uuid,
27
28 #[schemars(
29 title = "Скрипт генерации тестового игрока",
30 schema_with = "script_schema"
31 )]
32 pub script: String,
33}