#![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;
use crate::protocol::stellar1;
use super::common::*;
use super::chat_ui::*;
use super::unfurl::*;
use super::commands::*;
pub type VersionKind = String;
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum TextPaymentResultTyp {
Sent_0,
Error_1,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum TextPaymentResult {
Error {error: String},
Sent {sent: stellar1::PaymentID},
}
#[derive(Serialize, Deserialize, Debug)]
pub struct TextPayment {
#[serde(default)]
pub username: Option<String>,
#[serde(default)]
pub paymentText: Option<String>,
pub result: Option<TextPaymentResult>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct KnownUserMention {
#[serde(default)]
pub text: Option<String>,
pub uid: Option<gregor1::UID>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct KnownTeamMention {
#[serde(default)]
pub name: Option<String>,
#[serde(default)]
pub channel: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MaybeMention {
#[serde(default)]
pub name: Option<String>,
#[serde(default)]
pub channel: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct Coordinate {
pub lat: Option<f64>,
pub lon: Option<f64>,
pub accuracy: Option<f64>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct LiveLocation {
pub endTime: Option<gregor1::Time>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageText {
#[serde(default)]
pub body: Option<String>,
#[serde(default)]
pub payments: Option<Vec<TextPayment>>,
pub replyTo: Option<MessageID>,
pub replyToUID: Option<gregor1::UID>,
#[serde(default)]
pub userMentions: Option<Vec<KnownUserMention>>,
#[serde(default)]
pub teamMentions: Option<Vec<KnownTeamMention>>,
pub liveLocation: Option<LiveLocation>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageConversationMetadata {
#[serde(default)]
pub conversationTitle: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageEdit {
pub messageID: Option<MessageID>,
#[serde(default)]
pub body: Option<String>,
#[serde(default)]
pub userMentions: Option<Vec<KnownUserMention>>,
#[serde(default)]
pub teamMentions: Option<Vec<KnownTeamMention>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageDelete {
#[serde(default)]
pub messageIDs: Option<Vec<MessageID>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageHeadline {
#[serde(default)]
pub headline: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageFlip {
#[serde(default)]
pub text: Option<String>,
pub gameID: Option<FlipGameID>,
pub flipConvID: Option<ConversationID>,
#[serde(default)]
pub userMentions: Option<Vec<KnownUserMention>>,
#[serde(default)]
pub teamMentions: Option<Vec<KnownTeamMention>>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum MessageSystemType {
Addedtoteam_0,
Inviteaddedtoteam_1,
Complexteam_2,
Createteam_3,
Gitpush_4,
Changeavatar_5,
Changeretention_6,
Bulkaddtoconv_7,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageSystemAddedToTeam {
#[serde(default)]
pub team: Option<String>,
#[serde(default)]
pub adder: Option<String>,
#[serde(default)]
pub addee: Option<String>,
#[serde(default)]
pub owners: Option<Vec<String>>,
#[serde(default)]
pub admins: Option<Vec<String>>,
#[serde(default)]
pub writers: Option<Vec<String>>,
#[serde(default)]
pub readers: Option<Vec<String>>,
#[serde(default)]
pub bots: Option<Vec<String>>,
#[serde(default)]
pub restrictedBots: Option<Vec<String>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageSystemInviteAddedToTeam {
#[serde(default)]
pub team: Option<String>,
#[serde(default)]
pub inviter: Option<String>,
#[serde(default)]
pub invitee: Option<String>,
#[serde(default)]
pub adder: Option<String>,
pub inviteType: Option<keybase1::TeamInviteCategory>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageSystemComplexTeam {
#[serde(default)]
pub team: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageSystemCreateTeam {
#[serde(default)]
pub team: Option<String>,
#[serde(default)]
pub creator: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageSystemGitPush {
#[serde(default)]
pub team: Option<String>,
#[serde(default)]
pub pusher: Option<String>,
#[serde(default)]
pub repoName: Option<String>,
pub repoID: Option<keybase1::RepoID>,
#[serde(default)]
pub refs: Option<Vec<keybase1::GitRefMetadata>>,
pub pushType: Option<keybase1::GitPushType>,
#[serde(default)]
pub previousRepoName: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageSystemChangeAvatar {
#[serde(default)]
pub team: Option<String>,
#[serde(default)]
pub user: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageSystemChangeRetention {
#[serde(default)]
pub isTeam: Option<bool>,
#[serde(default)]
pub isInherit: Option<bool>,
pub membersType: Option<ConversationMembersType>,
pub policy: Option<RetentionPolicy>,
#[serde(default)]
pub user: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageSystemBulkAddToConv {
#[serde(default)]
pub usernames: Option<Vec<String>>,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum MessageSystem {
Addedtoteam {addedtoteam: MessageSystemAddedToTeam},
Inviteaddedtoteam {inviteaddedtoteam: MessageSystemInviteAddedToTeam},
Complexteam {complexteam: MessageSystemComplexTeam},
Createteam {createteam: MessageSystemCreateTeam},
Gitpush {gitpush: MessageSystemGitPush},
Changeavatar {changeavatar: MessageSystemChangeAvatar},
Changeretention {changeretention: MessageSystemChangeRetention},
Bulkaddtoconv {bulkaddtoconv: MessageSystemBulkAddToConv},
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageDeleteHistory {
pub upto: Option<MessageID>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageAttachment {
pub object: Option<Asset>,
pub preview: Option<Asset>,
#[serde(default)]
pub previews: Option<Vec<Asset>>,
#[serde(default)]
pub metadata: Option<String>,
#[serde(default)]
pub uploaded: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageAttachmentUploaded {
pub messageID: Option<MessageID>,
pub object: Option<Asset>,
#[serde(default)]
pub previews: Option<Vec<Asset>>,
#[serde(default)]
pub metadata: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageJoin {
#[serde(default)]
pub joiners: Option<Vec<String>>,
#[serde(default)]
pub leavers: Option<Vec<String>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageLeave {
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageReaction {
#[serde(rename = "m")]
pub messageID: Option<MessageID>,
#[serde(rename = "b")]
#[serde(default)]
pub body: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageSendPayment {
pub paymentID: Option<stellar1::PaymentID>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageRequestPayment {
pub requestID: Option<stellar1::KeybaseRequestID>,
#[serde(default)]
pub note: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageUnfurl {
pub unfurl: Option<UnfurlResult>,
pub messageID: Option<MessageID>,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum MessageBody {
Text {text: MessageText},
Attachment {attachment: MessageAttachment},
Edit {edit: MessageEdit},
Delete {delete: MessageDelete},
Metadata {metadata: MessageConversationMetadata},
Headline {headline: MessageHeadline},
Attachmentuploaded {attachmentuploaded: MessageAttachmentUploaded},
Join {join: MessageJoin},
Leave {leave: MessageLeave},
System {system: MessageSystem},
Deletehistory {deletehistory: MessageDeleteHistory},
Reaction {reaction: MessageReaction},
Sendpayment {sendpayment: MessageSendPayment},
Requestpayment {requestpayment: MessageRequestPayment},
Unfurl {unfurl: MessageUnfurl},
Flip {flip: MessageFlip},
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SenderPrepareOptions {
#[serde(default)]
pub skipTopicNameState: Option<bool>,
pub replyTo: Option<MessageID>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SenderSendOptions {
pub joinMentionsAs: Option<ConversationMemberStatus>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum OutboxStateType {
Sending_0,
Error_1,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum OutboxErrorType {
Misc_0,
Offline_1,
Identify_2,
Toolong_3,
Duplicate_4,
Expired_5,
Toomanyattempts_6,
Already_deleted_7,
Uploadfailed_8,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct OutboxStateError {
#[serde(default)]
pub message: Option<String>,
pub typ: Option<OutboxErrorType>,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum OutboxState {
Sending {sending: i32},
Error {error: OutboxStateError},
}
#[derive(Serialize, Deserialize, Debug)]
pub struct OutboxRecord {
pub state: Option<OutboxState>,
pub outboxID: Option<OutboxID>,
pub convID: Option<ConversationID>,
pub ctime: Option<gregor1::Time>,
pub Msg: Option<MessagePlaintext>,
pub identifyBehavior: Option<keybase1::TLFIdentifyBehavior>,
pub prepareOpts: Option<SenderPrepareOptions>,
pub sendOpts: Option<SenderSendOptions>,
pub ordinal: Option<i32>,
pub preview: Option<MakePreviewRes>,
pub replyTo: Option<Box<MessageUnboxed>>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum HeaderPlaintextVersion {
V1_1,
V2_2,
V3_3,
V4_4,
V5_5,
V6_6,
V7_7,
V8_8,
V9_9,
V10_10,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct HeaderPlaintextMetaInfo {
#[serde(default)]
pub crit: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct HeaderPlaintextUnsupported {
pub mi: Option<HeaderPlaintextMetaInfo>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct HeaderPlaintextV1 {
pub conv: Option<ConversationIDTriple>,
#[serde(default)]
pub tlfName: Option<String>,
#[serde(default)]
pub tlfPublic: Option<bool>,
pub messageType: Option<MessageType>,
#[serde(default)]
pub prev: Option<Vec<MessagePreviousPointer>>,
pub sender: Option<gregor1::UID>,
pub senderDevice: Option<gregor1::DeviceID>,
pub kbfsCryptKeysUsed: Option<bool>,
#[serde(default)]
pub bodyHash: Option<String>,
pub outboxInfo: Option<OutboxInfo>,
pub outboxID: Option<OutboxID>,
pub headerSignature: Option<SignatureInfo>,
pub merkleRoot: Option<MerkleRoot>,
#[serde(rename = "em")]
pub ephemeralMetadata: Option<MsgEphemeralMetadata>,
#[serde(rename = "b")]
pub botUID: Option<gregor1::UID>,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum HeaderPlaintext {
V1 {v1: HeaderPlaintextV1},
V2 {v2: HeaderPlaintextUnsupported},
V3 {v3: HeaderPlaintextUnsupported},
V4 {v4: HeaderPlaintextUnsupported},
V5 {v5: HeaderPlaintextUnsupported},
V6 {v6: HeaderPlaintextUnsupported},
V7 {v7: HeaderPlaintextUnsupported},
V8 {v8: HeaderPlaintextUnsupported},
V9 {v9: HeaderPlaintextUnsupported},
V10 {v10: HeaderPlaintextUnsupported},
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum BodyPlaintextVersion {
V1_1,
V2_2,
V3_3,
V4_4,
V5_5,
V6_6,
V7_7,
V8_8,
V9_9,
V10_10,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct BodyPlaintextMetaInfo {
#[serde(default)]
pub crit: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct BodyPlaintextUnsupported {
pub mi: Option<BodyPlaintextMetaInfo>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct BodyPlaintextV1 {
pub messageBody: Option<MessageBody>,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum BodyPlaintext {
V1 {v1: BodyPlaintextV1},
V2 {v2: BodyPlaintextUnsupported},
V3 {v3: BodyPlaintextUnsupported},
V4 {v4: BodyPlaintextUnsupported},
V5 {v5: BodyPlaintextUnsupported},
V6 {v6: BodyPlaintextUnsupported},
V7 {v7: BodyPlaintextUnsupported},
V8 {v8: BodyPlaintextUnsupported},
V9 {v9: BodyPlaintextUnsupported},
V10 {v10: BodyPlaintextUnsupported},
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessagePlaintext {
pub clientHeader: Option<MessageClientHeader>,
pub messageBody: Option<MessageBody>,
pub supersedesOutboxID: Option<OutboxID>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageUnboxedValid {
pub clientHeader: Option<MessageClientHeaderVerified>,
pub serverHeader: Option<MessageServerHeader>,
pub messageBody: Option<MessageBody>,
#[serde(default)]
pub senderUsername: Option<String>,
#[serde(default)]
pub senderDeviceName: Option<String>,
#[serde(default)]
pub senderDeviceType: Option<String>,
#[serde(default)]
pub bodyHash: Option<String>,
#[serde(default)]
pub headerHash: Option<String>,
pub headerSignature: Option<SignatureInfo>,
pub verificationKey: Option<String>,
pub senderDeviceRevokedAt: Option<gregor1::Time>,
#[serde(default)]
pub atMentionUsernames: Option<Vec<String>>,
#[serde(default)]
pub atMentions: Option<Vec<gregor1::UID>>,
pub channelMention: Option<ChannelMention>,
#[serde(default)]
pub maybeMentions: Option<Vec<MaybeMention>>,
#[serde(default)]
pub channelNameMentions: Option<Vec<ChannelNameMention>>,
pub reactions: Option<ReactionMap>,
pub unfurls: Option<std::collections::HashMap<MessageID, UnfurlResult>>,
pub replyTo: Option<Box<MessageUnboxed>>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum MessageUnboxedErrorType {
Misc_0,
Badversion_critical_1,
Badversion_2,
Identify_3,
Ephemeral_4,
Pairwise_missing_5,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageUnboxedError {
pub errType: Option<MessageUnboxedErrorType>,
#[serde(default)]
pub errMsg: Option<String>,
#[serde(default)]
pub internalErrMsg: Option<String>,
pub versionKind: Option<VersionKind>,
pub versionNumber: Option<i32>,
#[serde(default)]
pub isCritical: Option<bool>,
#[serde(default)]
pub senderUsername: Option<String>,
#[serde(default)]
pub senderDeviceName: Option<String>,
#[serde(default)]
pub senderDeviceType: Option<String>,
pub messageID: Option<MessageID>,
pub messageType: Option<MessageType>,
pub ctime: Option<gregor1::Time>,
#[serde(default)]
pub isEphemeral: Option<bool>,
#[serde(default)]
pub isEphemeralExpired: Option<bool>,
pub etime: Option<gregor1::Time>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageUnboxedPlaceholder {
pub messageID: Option<MessageID>,
#[serde(default)]
pub hidden: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum MessageUnboxed {
Valid {valid: MessageUnboxedValid},
Error {error: MessageUnboxedError},
Outbox {outbox: OutboxRecord},
Placeholder {placeholder: MessageUnboxedPlaceholder},
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UnreadFirstNumLimit {
pub NumRead: Option<i32>,
pub AtLeast: Option<i32>,
pub AtMost: Option<i32>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ConversationLocalParticipant {
#[serde(default)]
pub username: Option<String>,
pub fullname: Option<String>,
pub contactName: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ConversationInfoLocal {
pub id: Option<ConversationID>,
pub triple: Option<ConversationIDTriple>,
#[serde(default)]
pub tlfName: Option<String>,
#[serde(default)]
pub topicName: Option<String>,
#[serde(default)]
pub headline: Option<String>,
pub snippetMsg: Option<Box<MessageUnboxed>>,
pub draft: Option<String>,
pub visibility: Option<keybase1::TLFVisibility>,
pub status: Option<ConversationStatus>,
pub membersType: Option<ConversationMembersType>,
pub memberStatus: Option<ConversationMemberStatus>,
pub teamType: Option<TeamType>,
pub existence: Option<ConversationExistence>,
pub version: Option<ConversationVers>,
pub localVersion: Option<LocalConversationVers>,
#[serde(default)]
pub participants: Option<Vec<ConversationLocalParticipant>>,
pub finalizeInfo: Option<ConversationFinalizeInfo>,
#[serde(default)]
pub resetNames: Option<Vec<String>>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum ConversationErrorType {
Permanent_0,
Missinginfo_1,
Selfrekeyneeded_2,
Otherrekeyneeded_3,
Identify_4,
Transient_5,
None_6,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ConversationErrorLocal {
pub typ: Option<ConversationErrorType>,
#[serde(default)]
pub message: Option<String>,
pub remoteConv: Option<Conversation>,
#[serde(default)]
pub unverifiedTLFName: Option<String>,
pub rekeyInfo: Option<ConversationErrorRekey>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ConversationErrorRekey {
#[serde(default)]
pub tlfName: Option<String>,
#[serde(default)]
pub tlfPublic: Option<bool>,
#[serde(default)]
pub rekeyers: Option<Vec<String>>,
#[serde(default)]
pub writerNames: Option<Vec<String>>,
#[serde(default)]
pub readerNames: Option<Vec<String>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ConversationMinWriterRoleInfoLocal {
#[serde(default)]
pub changedBy: Option<String>,
#[serde(default)]
pub cannotWrite: Option<bool>,
pub role: Option<keybase1::TeamRole>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ConversationSettingsLocal {
pub minWriterRoleInfo: Option<ConversationMinWriterRoleInfoLocal>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ConversationLocal {
pub error: Option<ConversationErrorLocal>,
pub info: Option<ConversationInfoLocal>,
pub readerInfo: Option<ConversationReaderInfo>,
pub creatorInfo: Option<ConversationCreatorInfoLocal>,
pub notifications: Option<ConversationNotificationInfo>,
#[serde(default)]
pub supersedes: Option<Vec<ConversationMetadata>>,
#[serde(default)]
pub supersededBy: Option<Vec<ConversationMetadata>>,
#[serde(default)]
pub maxMessages: Option<Vec<MessageSummary>>,
#[serde(default)]
pub isEmpty: Option<bool>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
pub expunge: Option<Expunge>,
pub convRetention: Option<RetentionPolicy>,
pub teamRetention: Option<RetentionPolicy>,
pub convSettings: Option<ConversationSettingsLocal>,
pub commands: Option<ConversationCommandGroups>,
pub botCommands: Option<ConversationCommandGroups>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct NonblockFetchRes {
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ThreadView {
#[serde(default)]
pub messages: Option<Vec<Box<MessageUnboxed>>>,
pub pagination: Option<Pagination>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum MessageIDControlMode {
Oldermessages_0,
Newermessages_1,
Centered_2,
Unreadline_3,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MessageIDControl {
pub pivot: Option<MessageID>,
pub mode: Option<MessageIDControlMode>,
pub num: Option<i32>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetThreadQuery {
#[serde(default)]
pub markAsRead: Option<bool>,
#[serde(default)]
pub messageTypes: Option<Vec<MessageType>>,
#[serde(default)]
pub disableResolveSupersedes: Option<bool>,
#[serde(default)]
pub enableDeletePlaceholders: Option<bool>,
#[serde(default)]
pub disablePostProcessThread: Option<bool>,
pub before: Option<gregor1::Time>,
pub after: Option<gregor1::Time>,
pub messageIDControl: Option<MessageIDControl>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetThreadLocalRes {
pub thread: Option<ThreadView>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum GetThreadNonblockCbMode {
Full_0,
Incremental_1,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum GetThreadNonblockPgMode {
Default_0,
Server_1,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UnreadlineRes {
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
pub unreadlineID: Option<MessageID>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct NameQuery {
#[serde(default)]
pub name: Option<String>,
pub tlfID: Option<TLFID>,
pub membersType: Option<ConversationMembersType>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetInboxLocalQuery {
pub name: Option<NameQuery>,
pub topicName: Option<String>,
#[serde(default)]
pub convIDs: Option<Vec<ConversationID>>,
pub topicType: Option<TopicType>,
pub tlfVisibility: Option<keybase1::TLFVisibility>,
pub before: Option<gregor1::Time>,
pub after: Option<gregor1::Time>,
pub oneChatTypePerTLF: Option<bool>,
#[serde(default)]
pub status: Option<Vec<ConversationStatus>>,
#[serde(default)]
pub memberStatus: Option<Vec<ConversationMemberStatus>>,
#[serde(default)]
pub unreadOnly: Option<bool>,
#[serde(default)]
pub readOnly: Option<bool>,
#[serde(default)]
pub computeActiveList: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetInboxAndUnboxLocalRes {
#[serde(default)]
pub conversations: Option<Vec<ConversationLocal>>,
pub pagination: Option<Pagination>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetInboxAndUnboxUILocalRes {
#[serde(default)]
pub conversations: Option<Vec<InboxUIItem>>,
pub pagination: Option<Pagination>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct PostLocalRes {
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
pub messageID: Option<MessageID>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct PostLocalNonblockRes {
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
pub outboxID: Option<OutboxID>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct EditTarget {
pub messageID: Option<MessageID>,
pub outboxID: Option<OutboxID>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SetConversationStatusLocalRes {
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct NewConversationLocalRes {
pub conv: Option<ConversationLocal>,
pub uiConv: Option<InboxUIItem>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetInboxSummaryForCLILocalQuery {
pub topicType: Option<TopicType>,
#[serde(default)]
pub after: Option<String>,
#[serde(default)]
pub before: Option<String>,
pub visibility: Option<keybase1::TLFVisibility>,
#[serde(default)]
pub status: Option<Vec<ConversationStatus>>,
#[serde(default)]
pub unreadFirst: Option<bool>,
pub unreadFirstLimit: Option<UnreadFirstNumLimit>,
pub activitySortedLimit: Option<i32>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetInboxSummaryForCLILocalRes {
#[serde(default)]
pub conversations: Option<Vec<ConversationLocal>>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetConversationForCLILocalQuery {
#[serde(default)]
pub markAsRead: Option<bool>,
#[serde(default)]
pub MessageTypes: Option<Vec<MessageType>>,
pub Since: Option<String>,
pub limit: Option<UnreadFirstNumLimit>,
pub conv: Option<ConversationLocal>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetConversationForCLILocalRes {
pub conversation: Option<ConversationLocal>,
#[serde(default)]
pub messages: Option<Vec<Box<MessageUnboxed>>>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetMessagesLocalRes {
#[serde(default)]
pub messages: Option<Vec<Box<MessageUnboxed>>>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct PostFileAttachmentArg {
pub conversationID: Option<ConversationID>,
#[serde(default)]
pub tlfName: Option<String>,
pub visibility: Option<keybase1::TLFVisibility>,
#[serde(default)]
pub filename: Option<String>,
#[serde(default)]
pub title: Option<String>,
#[serde(default)]
pub metadata: Option<String>,
pub identifyBehavior: Option<keybase1::TLFIdentifyBehavior>,
pub callerPreview: Option<MakePreviewRes>,
pub outboxID: Option<OutboxID>,
pub ephemeralLifetime: Option<gregor1::DurationSec>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetNextAttachmentMessageLocalRes {
pub message: Option<Box<UIMessage>>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct DownloadAttachmentLocalRes {
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct DownloadFileAttachmentLocalRes {
#[serde(default)]
pub filename: Option<String>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum PreviewLocationTyp {
Url_0,
File_1,
Bytes_2,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum PreviewLocation {
Url {url: String},
File {file: String},
Bytes {bytes: String},
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MakePreviewRes {
#[serde(default)]
pub mimeType: Option<String>,
pub previewMimeType: Option<String>,
pub location: Option<PreviewLocation>,
pub metadata: Option<AssetMetadata>,
pub baseMetadata: Option<AssetMetadata>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct MarkAsReadLocalRes {
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct FindConversationsLocalRes {
#[serde(default)]
pub conversations: Option<Vec<ConversationLocal>>,
#[serde(default)]
pub uiConversations: Option<Vec<InboxUIItem>>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct JoinLeaveConversationLocalRes {
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct PreviewConversationLocalRes {
pub conv: Option<InboxUIItem>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct DeleteConversationLocalRes {
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct GetTLFConversationsLocalRes {
#[serde(default)]
pub convs: Option<Vec<InboxUIItem>>,
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SetAppNotificationSettingsLocalRes {
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct AppNotificationSettingLocal {
pub deviceType: Option<keybase1::DeviceType>,
pub kind: Option<NotificationKind>,
#[serde(default)]
pub enabled: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SearchRegexpRes {
#[serde(default)]
pub offline: Option<bool>,
#[serde(default)]
pub hits: Option<Vec<ChatSearchHit>>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct SearchInboxRes {
#[serde(default)]
pub offline: Option<bool>,
pub res: Option<ChatSearchInboxResults>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ProfileSearchConvStats {
#[serde(default)]
pub err: Option<String>,
#[serde(default)]
pub convName: Option<String>,
pub minConvID: Option<MessageID>,
pub maxConvID: Option<MessageID>,
pub numMissing: Option<i32>,
pub numMessages: Option<i32>,
pub indexSizeDisk: Option<i32>,
pub indexSizeMem: Option<i64>,
pub durationMsec: Option<gregor1::DurationMsec>,
pub percentIndexed: Option<i32>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct BuiltinCommandGroup {
pub typ: Option<ConversationBuiltinCommandTyp>,
#[serde(default)]
pub commands: Option<Vec<ConversationCommand>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct StaticConfig {
#[serde(default)]
pub deletableByDeleteHistory: Option<Vec<MessageType>>,
#[serde(default)]
pub builtinCommands: Option<Vec<BuiltinCommandGroup>>,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum UnfurlPromptAction {
Always_0,
Never_1,
Accept_2,
Notnow_3,
Onetime_4,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(untagged)]
pub enum UnfurlPromptResult {
Always {always: ()},
Never {never: ()},
Notnow {notnow: ()},
Accept {accept: String},
Onetime {onetime: String},
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum GalleryItemTyp {
Media_0,
Link_1,
Doc_2,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct LoadGalleryRes {
#[serde(default)]
pub messages: Option<Vec<Box<UIMessage>>>,
#[serde(default)]
pub last: Option<bool>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct LoadFlipRes {
pub status: Option<UICoinFlipStatus>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
#[serde(default)]
pub identifyFailures: Option<Vec<keybase1::TLFIdentifyFailure>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UserBotExtendedDescription {
#[serde(default)]
pub title: Option<String>,
#[serde(rename = "desktop_body")]
#[serde(default)]
pub desktopBody: Option<String>,
#[serde(rename = "mobile_body")]
#[serde(default)]
pub mobileBody: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UserBotCommandOutput {
#[serde(default)]
pub name: Option<String>,
#[serde(default)]
pub description: Option<String>,
#[serde(default)]
pub usage: Option<String>,
#[serde(rename = "extended_description")]
pub extendedDescription: Option<UserBotExtendedDescription>,
#[serde(default)]
pub username: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct UserBotCommandInput {
#[serde(default)]
pub name: Option<String>,
#[serde(default)]
pub description: Option<String>,
#[serde(default)]
pub usage: Option<String>,
#[serde(rename = "extended_description")]
pub extendedDescription: Option<UserBotExtendedDescription>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct AdvertiseCommandsParam {
pub typ: Option<BotCommandsAdvertisementTyp>,
#[serde(default)]
pub commands: Option<Vec<UserBotCommandInput>>,
pub teamName: Option<String>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct AdvertiseBotCommandsLocalRes {
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ListBotCommandsLocalRes {
#[serde(default)]
pub commands: Option<Vec<UserBotCommandOutput>>,
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}
#[derive(Serialize, Deserialize, Debug)]
pub struct ClearBotCommandsLocalRes {
#[serde(default)]
pub rateLimits: Option<Vec<RateLimit>>,
}