feat(types): NormalizedMessage, NormalizedReaction, ForwardJobData; accountId on IngestJobData
This commit is contained in:
@@ -9,6 +9,25 @@ export type MessageStatus =
|
||||
|
||||
export type ApprovalDecision = 'APPROVED' | 'REJECTED';
|
||||
|
||||
// Platform-neutral normalized message — zero Baileys/Telegram types here
|
||||
export interface NormalizedMessage {
|
||||
platformMsgId: string;
|
||||
sourceGroupJid: string;
|
||||
senderJid: string;
|
||||
senderName?: string;
|
||||
content: string;
|
||||
accountId: string; // which bot account received this message
|
||||
}
|
||||
|
||||
// Platform-neutral normalized reaction (e.g. WhatsApp emoji reaction)
|
||||
export interface NormalizedReaction {
|
||||
reactorJid: string;
|
||||
targetMsgId: string; // platformMsgId of the message being reacted to
|
||||
sourceGroupJid: string;
|
||||
emoji: string;
|
||||
accountId: string; // which bot account received this reaction
|
||||
}
|
||||
|
||||
export interface CanonicalMessage {
|
||||
messageId: string;
|
||||
platform: Platform;
|
||||
@@ -42,9 +61,19 @@ export interface SyncRoute {
|
||||
export interface IngestJobData {
|
||||
platformMsgId: string;
|
||||
platform: Platform;
|
||||
accountId: string; // which bot account received this message
|
||||
sourceGroupId: string;
|
||||
senderJid: string;
|
||||
senderName?: string;
|
||||
content: string;
|
||||
tags: string[];
|
||||
}
|
||||
|
||||
export interface ForwardJobData {
|
||||
messageId: string; // DB id of the approved Message record
|
||||
content: string;
|
||||
sourceGroupName: string;
|
||||
senderName?: string;
|
||||
toGroupJid: string;
|
||||
fromAccountId: string; // which bot account to send the forward from
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user