type MetersPerSecond = number; type Degrees = number; type Meters = number; type BeatsPerMinute = number; type Steps = number; type Watts = number; type Location = { latitude: Degrees; longitude: Degrees; }; type PublicLocation = Location & { reportedAt: number; }; type UUID = string; export type ConnectionOptions = { /** * Forces Firebase Realtime Database to use WebSockets instead of falling back * to long polling. This must be set before the first database listener is * created. */ forceWebSockets?: boolean; }; export declare function addLocationListener(pullKey: string, callback: (location: Location) => void, options?: ConnectionOptions): import("@firebase/database").Unsubscribe; export declare function addSpeedListener(pullKey: string, callback: (speed: MetersPerSecond) => void, options?: ConnectionOptions): import("@firebase/database").Unsubscribe; export declare function addHeadingListener(pullKey: string, callback: (heading: Degrees) => void, options?: ConnectionOptions): import("@firebase/database").Unsubscribe; export declare function addAltitudeListener(pullKey: string, callback: (altitude: Meters) => void, options?: ConnectionOptions): import("@firebase/database").Unsubscribe; export declare function addSessionIdListener(pullKey: string, callback: (sessionId: UUID | null) => void, options?: ConnectionOptions): import("@firebase/database").Unsubscribe; /** Creates a listener source for a streamer's private data with a pull key. */ export declare function forPullKey(pullKey: string, options?: ConnectionOptions): { addLocationListener(callback: (location: Location) => void): import("@firebase/database").Unsubscribe; addSpeedListener(callback: (speed: MetersPerSecond) => void): import("@firebase/database").Unsubscribe; addHeadingListener(callback: (heading: Degrees) => void): import("@firebase/database").Unsubscribe; addAltitudeListener(callback: (altitude: Meters) => void): import("@firebase/database").Unsubscribe; addHeartRateListener(callback: (altitude: BeatsPerMinute) => void): import("@firebase/database").Unsubscribe; addCyclingPowerListener(callback: (power: Watts) => void): import("@firebase/database").Unsubscribe; addCyclingCrankListener(callback: (power: Watts) => void): import("@firebase/database").Unsubscribe; addCyclingWheelListener(callback: (power: Watts) => void): import("@firebase/database").Unsubscribe; /** * This listener reports the number of steps taken so far. Note that this * number does not reset when the streamer goes offline. It is up to the * client to reset the number when the streamer goes offline or online. * Instead, the number is reported as the total number of steps taken since * an arbitrary point in time, and guaranteed to be monotonically increasing * for a given session id. */ addPedometerStepsListener(callback: (steps: Steps) => void): import("@firebase/database").Unsubscribe; /** * This listener is useful for accessing unstructured data associated with * the pull key. It includes the above fields as well as other fields such * as bluetooth heart rate or telemetry data. */ addListener(callback: (data: any) => void): import("@firebase/database").Unsubscribe; /** * This listener detects changes in the active session id. When a streamer * goes online, a new session id is created and this listener is triggered. * null sessionId's indicate the streamer is offline. Note that it is * possible for two sequential non-null sessionIds to be sent. */ addSessionIdListener(callback: (sessionId: UUID | null) => void): import("@firebase/database").Unsubscribe; }; /** Creates a listener source for a streamer's public data. */ export declare function forStreamer(provider: "twitch", userId: string, options?: ConnectionOptions): { /** If the public location is hidden (eg streamer is offline), null is passed. */ addLocationListener(callback: (location: PublicLocation | null) => void): import("@firebase/database").Unsubscribe; }; export {};