Hiyve Components - v1.0.0
    Preparing search index...

    Interface UseRoomStatsOptions

    Options for useRoomStats.

    interface UseRoomStatsOptions {
        fetchServerStats?: (
            roomName: string,
            signal: AbortSignal,
        ) => Promise<RoomServerStats | null>;
        monthRange?: number;
        onError?: (error: Error) => void;
        participantCount?: number;
        useFileRecordingCount?: boolean;
        userId?: string;
    }
    Index

    Properties

    fetchServerStats?: (
        roomName: string,
        signal: AbortSignal,
    ) => Promise<RoomServerStats | null>

    Consumer-provided fetcher for server-side statistics.

    Called whenever roomName changes with an AbortSignal the consumer must honor. Return null to fall back to file-only stats. Throw to trigger onError; isLoading resolves either way.

    Omit to run in file-only mode (all server fields default to 0/false).

    monthRange?: number

    Number of months for monthly activity chart (default 12).

    onError?: (error: Error) => void

    Invoked if the server-stats fetcher rejects (other than AbortError).

    participantCount?: number

    Number of participants (pass-through from input).

    useFileRecordingCount?: boolean

    If true, recordingCount reflects the file-side count. If false (default), recordingCount prefers the server-side recordings.total and falls back to the file count when no server stats are available.

    userId?: string

    User whose files to load (triggers fetchUserFiles on mount).