feat: add @tower/types shared package

This commit is contained in:
2026-05-27 13:42:15 +05:30
parent 0eff5f3c3f
commit bc0017aafb
4 changed files with 68 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
export * from './message';
+40
View File
@@ -0,0 +1,40 @@
export type Platform = 'whatsapp' | 'telegram' | 'discord';
export type MessageStatus =
| 'PENDING'
| 'APPROVED'
| 'REJECTED'
| 'DISTRIBUTED'
| 'ARCHIVED';
export type ApprovalDecision = 'APPROVED' | 'REJECTED';
export interface CanonicalMessage {
messageId: string;
platform: Platform;
platformMsgId: string;
sourceGroupId: string;
senderJid: string;
senderName?: string;
content: string;
mediaUrl?: string;
tags: string[];
status: MessageStatus;
createdAt: Date;
}
export interface Group {
id: string;
platform: Platform;
platformId: string;
name: string;
description?: string;
isActive: boolean;
}
export interface SyncRoute {
id: string;
sourceGroupId: string;
targetGroupId: string;
isActive: boolean;
}