Something went wrong. Try again.
Forkable live audio rooms for AT beachwave.app
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051export const ROOM_COLLECTION = 'community.beachwave.room' as const;
export type RoomStatus = 'live' | 'ended';
export interface BeachwaveRoomRecord { title: string; description?: string; livekitRoom: string; /** Base URL of the host's deployment; clients join media via `<serviceEndpoint>/api/token`. */ serviceEndpoint?: string; /** When true, participants join able to speak; otherwise they listen and request. */ openMic?: boolean; status: RoomStatus; createdAt: string; /** Host heartbeat; a live room with a stale lastActiveAt is treated as ended. */ lastActiveAt?: string; endedAt?: string; hosts?: string[];}
export interface BeachwaveRoom { uri: string; cid?: string; authorDid: string; record: BeachwaveRoomRecord;}
export interface CreateRoomInput { title: string; description?: string; livekitRoom?: string; hosts?: string[]; /** Base URL of this deployment, so the room is joinable across instances. */ serviceEndpoint?: string; /** Start the room as open mic (everyone speaks) instead of moderated. */ openMic?: boolean;}
export interface JoinRoomResult { room: BeachwaveRoom; livekitRoom: string;}
export interface RepositoryClient { did: string; createRecord(collection: string, record: unknown): Promise<{ uri: string; cid?: string }>; updateRecord(uri: string, record: unknown): Promise<{ uri: string; cid?: string }>; getRecord(uri: string): Promise<{ uri: string; cid?: string; value: unknown }>; listRecords(collection: string, repo?: string): Promise<Array<{ uri: string; cid?: string; value: unknown }>>;}