mattermost-mobile/types/api/websocket.d.ts
Mattermost Build 8f9210ec5b
[MM-67563] Change websocket format for translation update events (#9515) (#9531)
(cherry picked from commit d0cc38d549)

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2026-02-18 18:08:27 +02:00

33 lines
810 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
type WebsocketBroadcast = {
omit_users: Dictionary<boolean>;
user_id: string;
channel_id: string;
team_id: string;
}
type WebSocketMessage<T = any> = {
event: string;
data: T;
broadcast: WebsocketBroadcast;
seq: number;
}
type ThreadReadChangedData = {
thread_id: string;
timestamp: number;
unread_mentions: number;
unread_replies: number;
};
type PostTranslationUpdateData = {
object_id: string;
translations: Record<string, {
state: 'ready' | 'skipped' | 'processing' | 'unavailable';
translation: string; // JSON-encoded PostTranslation['object']
translation_type?: string;
src_lang?: string;
}>;
}