Files
cdcbrief-glm/src/types.ts
T

27 lines
601 B
TypeScript

export type AttachmentType = 'image' | 'video' | 'audio' | 'document' | 'other';
export type AttachmentCategory = 'general' | 'campaign';
export interface Attachment {
id: string;
file: File;
type: AttachmentType;
url: string; // Object URL for preview
category?: AttachmentCategory;
}
export interface AudioRecording {
blob: Blob;
url: string;
duration: number; // in seconds
}
export interface Message {
id: string;
sender: 'user' | 'system';
text: string;
attachments?: Attachment[];
audio?: AudioRecording;
timestamp: Date;
status: 'sending' | 'sent' | 'error';
}