Self-hosted multi-platform broadcast newsroom for activist collectives: publishing pipeline with group approval and DST-proof scheduling, TweetDeck-style column wall with hostile-content-safe rendering, live control room with Auto Director, bridged chat governance with polls and quorum, distributed sandboxed transcode workers, encrypted content-addressed archive, monthly analytics. MIT licensed. See README.md and docs/.
89 lines
1.7 KiB
TypeScript
89 lines
1.7 KiB
TypeScript
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<string, number>;
|
|
}
|
|
|
|
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<string, number>;
|
|
}
|
|
|
|
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<string, unknown> | null;
|
|
ip?: string;
|
|
sessionId?: string;
|
|
at: Date;
|
|
prevHash?: string;
|
|
hash: string;
|
|
}
|
|
|
|
export interface WebhookEvent {
|
|
id: string;
|
|
workspaceId: string;
|
|
provider: ProviderId;
|
|
eventType: string;
|
|
payload: Record<string, unknown>;
|
|
receivedAt: Date;
|
|
}
|