Files
Synapsis/src/lib/types.ts
T
AskIt e2fa572e84 feat(swarm): Implement decentralized node discovery and content federation system
- Add swarm node registry with discovery, gossip, and timeline synchronization
- Implement database schema for swarm nodes, seeds, and sync logs with proper indexing
- Create swarm API endpoints for node discovery, gossip protocol, timeline sharing, and announcements
- Add content moderation features with NSFW flagging and muted nodes support
- Implement user settings pages for content filtering and node moderation
- Add background scheduler for automated swarm synchronization and node health checks
- Create .well-known endpoint for swarm protocol discovery
- Remove legacy bot-cron.ts in favor of integrated scheduler system
- Add user account NSFW preferences and age verification tracking
- Update database schema with swarm-related tables and user moderation fields
- Enhance post and user components to support federated content display
- Add instrumentation for monitoring swarm operations and node health
2026-01-25 23:01:29 +01:00

66 lines
1.5 KiB
TypeScript

export interface User {
id: string;
handle: string;
displayName: string;
avatarUrl?: string | null;
bio?: string | null;
headerUrl?: string | null;
followersCount?: number;
followingCount?: number;
postsCount?: number;
website?: string | null;
createdAt?: string;
movedTo?: string | null;
isRemote?: boolean;
profileUrl?: string | null;
isBot?: boolean;
botOwner?: {
id: string;
handle: string;
displayName?: string | null;
avatarUrl?: string | null;
} | null;
}
export interface MediaItem {
id: string;
url: string;
altText?: string | null;
}
export interface Attachment {
id: string;
url: string;
altText?: string | null;
}
export interface Post {
id: string;
content: string;
createdAt: string;
likesCount: number;
repostsCount: number;
repliesCount: number;
author: User;
media?: MediaItem[];
linkPreviewUrl?: string | null;
linkPreviewTitle?: string | null;
linkPreviewDescription?: string | null;
linkPreviewImage?: string | null;
replyTo?: {
author: {
handle: string;
displayName: string;
};
} | null;
isLiked?: boolean;
isReposted?: boolean;
bot?: {
id: string;
name: string;
handle: string;
ownerId: string;
} | null;
nodeDomain?: string | null; // Domain of the node this post came from (for swarm posts)
}