import type { SceneIndexBase } from '../interfaces/core'; import type { BatchConfig } from '../types/capture'; import { HttpClient } from '../utils/httpClient'; /** * Scene data from index */ export interface SceneData { id: string; start: number; end: number; description?: string; metadata?: Record; } /** * Alert data */ export interface AlertData { id: string; eventId: string; callbackUrl: string; status?: string; } /** * SceneIndex class for managing scene indexes on RTStreams * * @example * ```typescript * const sceneIndex = await rtstream.indexVisuals({ * batchConfig: { type: 'time', value: 2, frameCount: 1 }, * prompt: 'Describe the scene', * socketId: ws.connectionId, * }); * * await sceneIndex.start(); * * // Later, get scenes * const { scenes, nextPage } = await sceneIndex.getScenes(); * ``` */ export declare class SceneIndex { #private; id: string; rtstreamId: string; status?: string; name?: string; batchConfig?: BatchConfig; prompt?: string; constructor(http: HttpClient, data: SceneIndexBase); /** * Start the scene index processing */ start: () => Promise; /** * Stop the scene index processing */ stop: () => Promise; /** * Create an event alert for this scene index * @param config - Alert configuration * @param config.eventId - ID of the event to trigger on * @param config.callbackUrl - URL to receive alert notifications * @returns The created alert ID * * @example * ```typescript * const alertId = await sceneIndex.createAlert({ * eventId: 'evt-xxx', * callbackUrl: 'https://example.com/webhook', * }); * ``` */ createAlert: (config: { eventId: string; callbackUrl: string; }) => Promise; /** * Get scenes from this index * @param start - Start time filter (optional) * @param end - End time filter (optional) * @param page - Page number (default: 1) * @param pageSize - Number of scenes per page (default: 100) * @returns Object with scenes array and next_page boolean */ getScenes: (start?: number, end?: number, page?: number, pageSize?: number) => Promise<{ scenes: SceneData[]; nextPage: boolean; }>; /** * List all alerts for this scene index * @returns Array of alert data */ listAlerts: () => Promise; /** * Enable an alert * @param alertId - ID of the alert to enable */ enableAlert: (alertId: string) => Promise; /** * Disable an alert * @param alertId - ID of the alert to disable */ disableAlert: (alertId: string) => Promise; /** * String representation of the SceneIndex */ toString(): string; }