Tactical Media Broadcast Hub — initial release
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/.
This commit is contained in:
commit
aa5e262f3a
880 changed files with 111042 additions and 0 deletions
89
packages/core/src/social.ts
Normal file
89
packages/core/src/social.ts
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue