feat: init
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum WsInbound {
|
||||
Auth {
|
||||
request_id: Uuid,
|
||||
token: String,
|
||||
},
|
||||
Heartbeat {
|
||||
request_id: Uuid,
|
||||
},
|
||||
JoinChannel {
|
||||
request_id: Uuid,
|
||||
channel_id: Uuid,
|
||||
},
|
||||
LeaveChannel {
|
||||
request_id: Uuid,
|
||||
channel_id: Uuid,
|
||||
},
|
||||
TypingStart {
|
||||
request_id: Uuid,
|
||||
channel_id: Uuid,
|
||||
thread_id: Option<Uuid>,
|
||||
},
|
||||
TypingStop {
|
||||
request_id: Uuid,
|
||||
channel_id: Uuid,
|
||||
thread_id: Option<Uuid>,
|
||||
},
|
||||
MessageSend {
|
||||
request_id: Uuid,
|
||||
channel_id: Uuid,
|
||||
body: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
thread_id: Option<Uuid>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
reply_to: Option<Uuid>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
message_type: Option<String>,
|
||||
},
|
||||
MessageEdit {
|
||||
request_id: Uuid,
|
||||
channel_id: Uuid,
|
||||
message_id: Uuid,
|
||||
body: String,
|
||||
},
|
||||
MessageDelete {
|
||||
request_id: Uuid,
|
||||
channel_id: Uuid,
|
||||
message_id: Uuid,
|
||||
},
|
||||
PresenceUpdate {
|
||||
request_id: Uuid,
|
||||
status: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
custom_status_text: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
custom_status_emoji: Option<String>,
|
||||
},
|
||||
ReadReceipt {
|
||||
request_id: Uuid,
|
||||
channel_id: Uuid,
|
||||
last_read_message_id: Uuid,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
last_seq: Option<i64>,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user