diff options
author | Ellie Huxtable <ellie@elliehuxtable.com> | 2023-03-20 09:26:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 09:26:54 +0000 |
commit | dcd77749dd1fdf6b0c8183bfbdf4f97bf238ebe4 (patch) | |
tree | 97c623911eeb52da65c2b3fd80092f2c86f3dd18 /atuin-common | |
parent | edcd477153d00944c5dae16ec3ba69e339e1450c (diff) |
Add history deletion (#791)
* Drop events. I'd still like to do them, but differently
* Start adding delete api stuff
* Set mailmap
* Delete delete delete
* Fix tests
* Make clippy happy
Diffstat (limited to 'atuin-common')
-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, } |