feat: add @tower/types shared package
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export * from './message';
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user