import type { ProviderId } from "./connection.js"; export interface FeedItem { id: string; provider: ProviderId; remoteId: string; authorHandle: string; text: string; mediaUrls: string[]; createdAt: Date; metrics: Record; } export interface Feed { id: string; workspaceId: string; connectionId: string; kind: "home" | "mentions" | "search" | "list"; query?: string; } export interface Conversation { id: string; workspaceId: string; connectionId: string; participantHandles: string[]; lastMessageAt: Date; unreadCount: number; assignedUserId?: string; } export interface Comment { id: string; provider: ProviderId; remoteId: string; onRemoteId: string; authorHandle: string; text: string; createdAt: Date; } export interface Reaction { id: string; provider: ProviderId; onRemoteId: string; kind: string; count: number; } export interface Metric { id: string; workspaceId: string; subjectType: "publication" | "channel" | "livestream"; subjectId: string; capturedAt: Date; values: Record; } export interface AnalyticsSnapshot { subjectId: string; windowStart: Date; windowEnd: Date; series: readonly Metric[]; } export interface AuditLogEntry { id: string; workspaceId: string; actorUserId: string; actorRole: string; action: string; targetType: string; targetId: string; diff: Record | null; ip?: string; sessionId?: string; at: Date; prevHash?: string; hash: string; } export interface WebhookEvent { id: string; workspaceId: string; provider: ProviderId; eventType: string; payload: Record; receivedAt: Date; }