keybase-protocol 0.1.1

Provides the Keybase types defined in the Keybase AVDL Protocol files for Rust.
Documentation
// Namespace: "chat.1"
// Protocol: "NotifyChat"
#![allow(dead_code)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::{Serialize, Deserialize};
use serde_repr::{Deserialize_repr, Serialize_repr};use super::*;

use crate::protocol::keybase1;
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum ChatActivitySource {
  Local_0,
  Remote_1,
}

#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum ChatActivityType {
  Reserved_0,
  Incoming_message_1,
  Read_message_2,
  New_conversation_3,
  Set_status_4,
  Failed_message_5,
  Members_update_6,
  Set_app_notification_settings_7,
  Teamtype_8,
  Expunge_9,
  Ephemeral_purge_10,
  Reaction_update_11,
  Messages_updated_12,
}

pub struct IncomingMessage {
  pub message: Box<UIMessage>,
  pub modifiedMessage: Option<Box<UIMessage>>,
  pub convID: ConversationID,
  pub displayDesktopNotification: bool,
  pub desktopNotificationSnippet: Option<String>,
  pub conv: Option<InboxUIItem>,
  pub pagination: Option<UIPagination>,
}

pub struct ReadMessageInfo {
  pub convID: ConversationID,
  pub msgID: MessageID,
  pub conv: Option<InboxUIItem>,
}

pub struct NewConversationInfo {
  pub convID: ConversationID,
  pub conv: Option<InboxUIItem>,
}

pub struct SetStatusInfo {
  pub convID: ConversationID,
  pub status: ConversationStatus,
  pub conv: Option<InboxUIItem>,
}

pub struct SetAppNotificationSettingsInfo {
  pub convID: ConversationID,
  pub settings: ConversationNotificationInfo,
}

pub struct FailedMessageInfo {
  pub outboxRecords: Option<Vec<OutboxRecord>>,
  pub isEphemeralPurge: bool,
}

pub struct MemberInfo {
  pub member: Option<String>,
  pub status: ConversationMemberStatus,
}

pub struct MembersUpdateInfo {
  pub convID: ConversationID,
  pub members: Option<Vec<MemberInfo>>,
}

pub struct TeamTypeInfo {
  pub convID: ConversationID,
  pub teamType: TeamType,
  pub conv: Option<InboxUIItem>,
}

pub struct ExpungeInfo {
  pub convID: ConversationID,
  pub expunge: Expunge,
}

pub struct EphemeralPurgeNotifInfo {
  pub convID: ConversationID,
  pub msgs: Option<Vec<Box<UIMessage>>>,
}

pub struct ReactionUpdate {
  pub reactions: ReactionMap,
  pub targetMsgID: MessageID,
}

pub struct ReactionUpdateNotif {
  pub convID: ConversationID,
  pub userReacjis: keybase1::UserReacjis,
  pub reactionUpdates: Option<Vec<ReactionUpdate>>,
}

pub struct MessagesUpdated {
  pub convID: ConversationID,
  pub updates: Option<Vec<Box<UIMessage>>>,
}

pub enum ChatActivity {
  Incoming_message {incoming_message: IncomingMessage},
  Read_message {read_message: ReadMessageInfo},
  New_conversation {new_conversation: NewConversationInfo},
  Set_status {set_status: SetStatusInfo},
  Failed_message {failed_message: FailedMessageInfo},
  Members_update {members_update: MembersUpdateInfo},
  Set_app_notification_settings {set_app_notification_settings: SetAppNotificationSettingsInfo},
  Teamtype {teamtype: TeamTypeInfo},
  Expunge {expunge: ExpungeInfo},
  Ephemeral_purge {ephemeral_purge: EphemeralPurgeNotifInfo},
  Reaction_update {reaction_update: ReactionUpdateNotif},
  Messages_updated {messages_updated: MessagesUpdated},
}

pub struct TyperInfo {
  pub uid: keybase1::UID,
  pub username: Option<String>,
  pub deviceID: keybase1::DeviceID,
  pub deviceName: Option<String>,
  pub deviceType: Option<String>,
}

pub struct ConvTypingUpdate {
  pub convID: ConversationID,
  pub typers: Option<Vec<TyperInfo>>,
}

#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum StaleUpdateType {
  Clear_0,
  Newactivity_1,
  Convupdate_2,
}

pub struct ConversationStaleUpdate {
  pub convID: ConversationID,
  pub updateType: StaleUpdateType,
}

pub struct ChatSyncIncrementalConv {
  pub conv: UnverifiedInboxUIItem,
  pub shouldUnbox: bool,
}

pub struct ChatSyncIncrementalInfo {
  pub items: Option<Vec<ChatSyncIncrementalConv>>,
  pub removals: Option<Vec<String>>,
}

pub enum ChatSyncResult {
  Current {current: ()},
  Clear {clear: ()},
  Incremental {incremental: ChatSyncIncrementalInfo},
}

// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")


// @notify("")
// @lint("ignore")