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

    Constructors

    Methods

    • Parameters

      • alertId: string
      • Optionalnote: string

      Returns Promise<CloudMeetingAlert>

    • RAG: search for context then generate AI answer

      Parameters

      Returns Promise<AskResponse>

    • Parameters

      • meetingId: string

      Returns Promise<void>

    • Check which connected users match a metadata-based relationship with the caller.

      The server derives the match value from the caller's profile in the database — the client only specifies which metadata field names to compare and their own profile ID.

      Parameters

      • callerProfileId: string

        The calling user's profile ID (for metadata lookup)

      • match: { callerField: string; userField: string }

        Field name mapping: userField on connected users, callerField on the caller

      Returns Promise<string[]>

      Array of online user IDs that match

    • Clear cached token (forces re-generation on next request)

      Returns void

    • Clear the current userId (e.g., on logout). Stops the presence heartbeat and sends an offline signal.

      Returns void

    • Open an SSE stream for real-time active room discovery. Returns a handle with a close() method to terminate the connection.

      Parameters

      • userId: string

        The user ID to filter rooms for (required)

      • Optionalhandlers: {
            onError?: (error: Error) => void;
            onRoomAdded?: (room: CloudActiveRoom) => void;
            onRoomRemoved?: (roomName: string) => void;
            onRoomUpdated?: (room: Partial<CloudActiveRoom> & { name: string }) => void;
            onSnapshot?: (rooms: CloudActiveRoom[]) => void;
        }

        Event handlers for stream events

      Returns Promise<ActiveRoomsStreamHandle>

    • Open an SSE stream for real-time chat messages in a room. Returns a handle with a close() method to terminate the connection.

      Parameters

      • roomName: string

        The room to stream messages for

      • Optionalhandlers: {
            onError?: (error: Error) => void;
            onMessage?: (message: ChatStreamMessage) => void;
            onSnapshot?: (messages: ChatStreamMessage[]) => void;
        }

        Event handlers for stream events

      Returns Promise<ChatStreamHandle>

    • Tear down the client. Stops the presence heartbeat and sends an immediate offline signal. Call this when the client is no longer needed.

      Returns void

    • Parameters

      Returns Promise<string>

    • List active rooms for the authenticated org/tenant. When userId is provided, only rooms targeting that user are returned.

      Parameters

      • OptionaluserId: string

      Returns Promise<CloudActiveRoom[]>

    • Get the SSE stream URL for active room discovery. Returns the full URL including authentication and userId query parameters.

      Parameters

      • userId: string

        The user ID to filter rooms for (required)

      Returns Promise<string>

      EventSource (SSE) does not support custom headers, so authentication is passed via query parameter. Use the returned URL with store.connectActiveRooms(url) or new EventSource(url).

    • Get paginated message history for a room.

      Parameters

      • roomName: string

        The room to fetch history for

      • Optionaloptions: { cursor?: string; limit?: number }

        Pagination options (cursor, limit)

      Returns Promise<ChatHistoryResponse>

      Messages and next cursor for pagination

    • Get the SSE stream URL for real-time chat messages in a room. Exchanges the cloud token for a single-use ticket (keeps token out of URL).

      Parameters

      • roomName: string

        The room to stream messages for

      Returns Promise<string>

      Full SSE URL with ticket and roomName query params

    • Get all conversations (rooms) the user has chatted in, with last message preview and count.

      Parameters

      • userId: string

        The user ID to fetch conversations for

      Returns Promise<ChatConversation[]>

      Array of conversation summaries sorted by most recent

    • Parameters

      • meetingId: string

      Returns Promise<CloudMeeting>

    • Parameters

      • Optionaloptions: {
            limit?: number;
            startAfter?: string | Date;
            startBefore?: string | Date;
            status?: string;
        }

      Returns Promise<CloudMeeting[]>

    • Parameters

      Returns Promise<string>

    • Send a presence heartbeat to indicate the current user is online. Call this periodically (e.g., every 5s) from any page. The server stores it in Redis with an 8s TTL.

      Parameters

      • userEmail: string

        The current user's email

      Returns Promise<void>

    • Immediately remove the user's online presence (e.g., on logout).

      Parameters

      • userEmail: string

        The current user's email

      Returns Promise<void>

    • Push mood/sentiment data to a response context.

      Parameters

      • responseId: string

        Context identifier (e.g. from a recording or live session)

      • userId: string

        User ID for request validation

      • sentimentContext: SentimentContext

        Sentiment/mood data to push

      Returns Promise<{ responseId: string }>

    • Query against accumulated meeting context identified by a response ID.

      Parameters

      • responseId: string

        Context identifier (e.g. from a recording or live session)

      • userId: string

        User ID for request validation

      • query: string

        Question to ask about the meeting content

      • Optionaloptions: { model?: string; promptKey?: string }

        Optional parameters (promptKey, model)

      Returns Promise<AIResponse>

    • Remove an advertised room from discovery.

      Parameters

      • roomName: string

      Returns Promise<void>

    • Send a chat message to a room. The message is persisted and broadcast to SSE subscribers via MongoDB change stream.

      Parameters

      • roomName: string

        The room to send the message to

      • message: string

        The message text (max 1000 chars)

      • userId: string

        The sender's user ID

      Returns Promise<{ messageId: string }>

      The persisted message ID

    • Parameters

      Returns Promise<void>

    • Update the cloud token (e.g., after manual refresh)

      Parameters

      • token: string

      Returns void

    • Set or update the current user's email. Forces a token refresh on the next request. Restarts the presence heartbeat if enabled.

      Parameters

      • userId: string

      Returns void

    • Update an advertised room's metadata.

      Parameters

      Returns Promise<void>