diff options
Diffstat (limited to 'atuin-common/src')
| -rw-r--r-- | atuin-common/src/api.rs | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/atuin-common/src/api.rs b/atuin-common/src/api.rs index f5d5daa6..6f18d18c 100644 --- a/atuin-common/src/api.rs +++ b/atuin-common/src/api.rs @@ -66,31 +66,18 @@ pub struct IndexResponse { pub version: String, } -// Doubled up with the history sync stuff, because atm we need to support BOTH. -// People are still running old clients, and in some cases _very_ old clients. #[derive(Debug, Serialize, Deserialize)] -pub enum AddEventRequest { - Create(AddHistoryRequest), - - Delete { - id: String, - timestamp: chrono::DateTime<Utc>, - hostname: chrono::DateTime<Utc>, - - // When we delete a history item, we push up an event marking its client - // id as being deleted. - history_id: String, - }, +pub struct StatusResponse { + pub count: i64, + pub deleted: Vec<String>, } #[derive(Debug, Serialize, Deserialize)] -pub struct SyncEventRequest { - pub sync_ts: chrono::DateTime<chrono::FixedOffset>, - pub event_ts: chrono::DateTime<chrono::FixedOffset>, - pub host: String, +pub struct DeleteHistoryRequest { + pub client_id: String, } #[derive(Debug, Serialize, Deserialize)] -pub struct SyncEventResponse { - pub events: Vec<String>, +pub struct MessageResponse { + pub message: String, } |
