1use serde::{Deserialize, Serialize};
2
3#[cfg(feature = "ts-rs")]
4use ts_rs::TS;
5
6pub type Id = String;
8
9pub type Timestamp = i64;
18
19#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
24#[cfg_attr(feature = "ts-rs", derive(TS), ts(export, export_to = "../bindings/"))]
25#[serde(rename_all = "camelCase")]
26pub struct ScopeIds {
27 #[serde(default, skip_serializing_if = "Option::is_none")]
28 #[cfg_attr(feature = "ts-rs", ts(optional))]
29 pub session_id: Option<String>,
30 #[serde(default, skip_serializing_if = "Option::is_none")]
31 #[cfg_attr(feature = "ts-rs", ts(optional))]
32 pub repo_id: Option<String>,
33 #[serde(default, skip_serializing_if = "Option::is_none")]
34 #[cfg_attr(feature = "ts-rs", ts(optional))]
35 pub agent_id: Option<String>,
36 #[serde(default, skip_serializing_if = "Option::is_none")]
37 #[cfg_attr(feature = "ts-rs", ts(optional))]
38 pub user_id: Option<String>,
39 #[serde(default, skip_serializing_if = "Option::is_none")]
40 #[cfg_attr(feature = "ts-rs", ts(optional))]
41 pub task_id: Option<String>,
42}
43
44#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
46#[cfg_attr(feature = "ts-rs", derive(TS), ts(export, export_to = "../bindings/"))]
47#[serde(rename_all = "camelCase")]
48pub struct ValidationError {
49 pub field: String,
50 pub message: String,
51 #[serde(default, skip_serializing_if = "Option::is_none")]
52 #[cfg_attr(feature = "ts-rs", ts(optional))]
53 pub value: Option<serde_json::Value>,
54}