@namespace("chat.1") protocol NotifyChat { import idl "../keybase1" as keybase1; enum ChatActivitySource { LOCAL_0, REMOTE_1 } 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 } record IncomingMessage { UIMessage message; union { null, UIMessage } modifiedMessage; ConversationID convID; boolean displayDesktopNotification; string desktopNotificationSnippet; union { null, InboxUIItem } conv; union { null, UIPagination } pagination; } record ReadMessageInfo { ConversationID convID; MessageID msgID; union { null, InboxUIItem } conv; } record NewConversationInfo { ConversationID convID; union { null, InboxUIItem } conv; } record SetStatusInfo { ConversationID convID; ConversationStatus status; union { null, InboxUIItem } conv; } record SetAppNotificationSettingsInfo { ConversationID convID; ConversationNotificationInfo settings; } record FailedMessageInfo { array outboxRecords; boolean isEphemeralPurge; union { null, InboxUIItem } conv; } record MemberInfo { string member; ConversationMemberStatus status; } record MembersUpdateInfo { ConversationID convID; array members; } record TeamTypeInfo { ConversationID convID; TeamType teamType; union { null, InboxUIItem } conv; } record ExpungeInfo { ConversationID convID; Expunge expunge; } record EphemeralPurgeNotifInfo { ConversationID convID; array msgs; } record ReactionUpdate { ReactionMap reactions; MessageID targetMsgID; } record ReactionUpdateNotif { ConversationID convID; keybase1.UserReacjis userReacjis; array reactionUpdates; } record MessagesUpdated { ConversationID convID; array updates; } variant ChatActivity switch (ChatActivityType activityType) { case INCOMING_MESSAGE: IncomingMessage; case READ_MESSAGE: ReadMessageInfo; case NEW_CONVERSATION: NewConversationInfo; case SET_STATUS: SetStatusInfo; case FAILED_MESSAGE: FailedMessageInfo; case MEMBERS_UPDATE: MembersUpdateInfo; case SET_APP_NOTIFICATION_SETTINGS: SetAppNotificationSettingsInfo; case TEAMTYPE: TeamTypeInfo; case EXPUNGE: ExpungeInfo; case EPHEMERAL_PURGE: EphemeralPurgeNotifInfo; case REACTION_UPDATE: ReactionUpdateNotif; case MESSAGES_UPDATED: MessagesUpdated; } record TyperInfo { keybase1.UID uid; string username; keybase1.DeviceID deviceID; } record ConvTypingUpdate { ConversationID convID; array typers; } enum StaleUpdateType { CLEAR_0, NEWACTIVITY_1 } record ConversationStaleUpdate { ConversationID convID; StaleUpdateType updateType; } record ChatSyncIncrementalConv { UnverifiedInboxUIItem conv; boolean shouldUnbox; } record ChatSyncIncrementalInfo { array items; array removals; // Removed ConvIDs } variant ChatSyncResult switch (SyncInboxResType syncType) { case CURRENT: void; case CLEAR: void; case INCREMENTAL: ChatSyncIncrementalInfo; } @notify("") @lint("ignore") void NewChatActivity(keybase1.UID uid, ChatActivity activity, ChatActivitySource source); @notify("") @lint("ignore") void ChatIdentifyUpdate(keybase1.CanonicalTLFNameAndIDWithBreaks update); @notify("") @lint("ignore") void ChatTLFFinalize(keybase1.UID uid, ConversationID convID, ConversationFinalizeInfo finalizeInfo, union { null, InboxUIItem } conv); @notify("") @lint("ignore") void ChatTLFResolve(keybase1.UID uid, ConversationID convID, ConversationResolveInfo resolveInfo); @notify("") @lint("ignore") void ChatInboxStale(keybase1.UID uid); @notify("") @lint("ignore") void ChatThreadsStale(keybase1.UID uid, array updates); @notify("") @lint("ignore") void ChatTypingUpdate(array typingUpdates); @notify("") @lint("ignore") void ChatJoinedConversation(keybase1.UID uid, ConversationID convID, union { null, InboxUIItem } conv); @notify("") @lint("ignore") void ChatLeftConversation(keybase1.UID uid, ConversationID convID); @notify("") @lint("ignore") void ChatResetConversation(keybase1.UID uid, ConversationID convID); @notify("") @lint("ignore") void ChatInboxSyncStarted(keybase1.UID uid); @notify("") @lint("ignore") void ChatInboxSynced(keybase1.UID uid, ChatSyncResult syncRes); @notify("") @lint("ignore") void ChatSetConvRetention(keybase1.UID uid, ConversationID convID, union { null, InboxUIItem } conv); @notify("") @lint("ignore") void ChatSetTeamRetention(keybase1.UID uid, keybase1.TeamID teamID, array convs); @notify("") @lint("ignore") void ChatSetConvSettings(keybase1.UID uid, ConversationID convID, union { null, InboxUIItem } conv); @notify("") @lint("ignore") void ChatSubteamRename(keybase1.UID uid, array convs); @notify("") @lint("ignore") void ChatKBFSToImpteamUpgrade(keybase1.UID uid, ConversationID convID); @notify("") @lint("ignore") void ChatAttachmentUploadStart(keybase1.UID uid, ConversationID convID, OutboxID outboxID); @notify("") @lint("ignore") void ChatAttachmentUploadProgress(keybase1.UID uid, ConversationID convID, OutboxID outboxID, long bytesComplete, long bytesTotal); @notify("") @lint("ignore") void ChatPaymentInfo(keybase1.UID uid, ConversationID convID, MessageID msgID, UIPaymentInfo info); @notify("") @lint("ignore") void ChatRequestInfo(keybase1.UID uid, ConversationID convID, MessageID msgID, UIRequestInfo info); @notify("") @lint("ignore") void ChatPromptUnfurl(keybase1.UID uid, ConversationID convID, MessageID msgID, string domain); @notify("") @lint("ignore") void ChatConvUpdate(keybase1.UID uid, ConversationID convID, union { null, InboxUIItem } conv); @notify("") @lint("ignore") void ChatWelcomeMessageLoaded(keybase1.TeamID teamID, WelcomeMessageDisplay message); @notify("") @lint("ignore") void ChatParticipantsInfo(map> participants); }