#![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::gregor1;
use crate::protocol::keybase1;
#[derive(Serialize, Deserialize, Debug)]
pub struct GenericPayload {
#[serde(default)]
pub Action: Option<String>,
pub inboxVers: Option<InboxVers>,
pub convID: Option<ConversationID>,
pub topicType: Option<TopicType>,
pub unreadUpdate: Option<UnreadUpdate>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct NewConversationPayload {
#[serde(default)]
pub Action: Option<String>,
pub convID: Option<ConversationID>,
pub inboxVers: Option<InboxVers>,
pub topicType: Option<TopicType>,
pub unreadUpdate: Option<UnreadUpdate>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct NewMessagePayload {
#[serde(default)]
pub Action: Option<String>,
pub convID: Option<ConversationID>,
pub message: Option<MessageBoxed>,
pub inboxVers: Option<InboxVers>,
pub topicType: Option<TopicType>,
pub unreadUpdate: Option<UnreadUpdate>,
#[serde(default)]
pub maxMsgs: Option<Vec<MessageSummary>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ReadMessagePayload {
#[serde(default)]
pub Action: Option<String>,
pub convID: Option<ConversationID>,
pub msgID: Option<MessageID>,
pub inboxVers: Option<InboxVers>,
pub topicType: Option<TopicType>,
pub unreadUpdate: Option<UnreadUpdate>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SetStatusPayload {
#[serde(default)]
pub Action: Option<String>,
pub convID: Option<ConversationID>,
pub status: Option<ConversationStatus>,
pub inboxVers: Option<InboxVers>,
pub topicType: Option<TopicType>,
pub unreadUpdate: Option<UnreadUpdate>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct TeamTypePayload {
#[serde(default)]
pub Action: Option<String>,
pub convID: Option<ConversationID>,
pub teamType: Option<TeamType>,
pub inboxVers: Option<InboxVers>,
pub topicType: Option<TopicType>,
pub unreadUpdate: Option<UnreadUpdate>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SetAppNotificationSettingsPayload {
#[serde(default)]
pub Action: Option<String>,
pub convID: Option<ConversationID>,
pub inboxVers: Option<InboxVers>,
pub settings: Option<ConversationNotificationInfo>,
pub topicType: Option<TopicType>,
pub unreadUpdate: Option<UnreadUpdate>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ExpungePayload {
#[serde(default)]
pub Action: Option<String>,
pub convID: Option<ConversationID>,
pub inboxVers: Option<InboxVers>,
pub expunge: Option<Expunge>,
#[serde(default)]
pub maxMsgs: Option<Vec<MessageSummary>>,
pub topicType: Option<TopicType>,
pub unreadUpdate: Option<UnreadUpdate>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UnreadUpdate {
pub convID: Option<ConversationID>,
pub unreadMessages: Option<i32>,
pub unreadNotifyingMessages: Option<std::collections::HashMap<keybase1::DeviceType, i32>>,
#[serde(rename = "UnreadMessages")]
pub compatUnreadMessages: Option<i32>,
#[serde(default)]
pub diff: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct TLFFinalizeUpdate {
pub finalizeInfo: Option<ConversationFinalizeInfo>,
#[serde(default)]
pub convIDs: Option<Vec<ConversationID>>,
pub inboxVers: Option<InboxVers>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct TLFResolveUpdate {
pub convID: Option<ConversationID>,
pub inboxVers: Option<InboxVers>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct RemoteUserTypingUpdate {
pub uid: Option<gregor1::UID>,
pub deviceID: Option<gregor1::DeviceID>,
pub convID: Option<ConversationID>,
#[serde(default)]
pub typing: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UpdateConversationMembership {
pub inboxVers: Option<InboxVers>,
#[serde(default)]
pub joined: Option<Vec<ConversationMember>>,
#[serde(default)]
pub removed: Option<Vec<ConversationMember>>,
#[serde(default)]
pub reset: Option<Vec<ConversationMember>>,
#[serde(default)]
pub previewed: Option<Vec<ConversationID>>,
pub unreadUpdate: Option<UnreadUpdate>,
#[serde(default)]
pub unreadUpdates: Option<Vec<UnreadUpdate>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ConversationUpdate {
pub convID: Option<ConversationID>,
pub existence: Option<ConversationExistence>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UpdateConversations {
pub inboxVers: Option<InboxVers>,
#[serde(default)]
pub convUpdates: Option<Vec<ConversationUpdate>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct TeamChannelUpdate {
pub teamID: Option<TLFID>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SetConvRetentionUpdate {
pub inboxVers: Option<InboxVers>,
pub convID: Option<ConversationID>,
pub policy: Option<RetentionPolicy>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SetTeamRetentionUpdate {
pub inboxVers: Option<InboxVers>,
pub teamID: Option<keybase1::TeamID>,
pub policy: Option<RetentionPolicy>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SetConvSettingsUpdate {
pub inboxVers: Option<InboxVers>,
pub convID: Option<ConversationID>,
pub convSettings: Option<ConversationSettings>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct KBFSImpteamUpgradeUpdate {
pub convID: Option<ConversationID>,
pub inboxVers: Option<InboxVers>,
pub topicType: Option<TopicType>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SubteamRenameUpdate {
#[serde(default)]
pub convIDs: Option<Vec<ConversationID>>,
pub inboxVers: Option<InboxVers>,
}