import { Controller } from './controller'; import { Debuggee } from '../debuggee'; import * as stackdriver from '../types/stackdriver'; import * as firebase from 'firebase-admin'; export declare class FirebaseController implements Controller { db: firebase.database.Database; debuggeeId?: string; bpRef?: firebase.database.Reference; markActiveInterval: ReturnType | undefined; markActivePeriodMsec: number; /** * Connects to the Firebase database. * * The project Id passed in options is preferred over any other sources. * * @param options specifies which database and credentials to use * @returns database connection */ static initialize(options: { keyPath?: string; databaseUrl?: string; projectId?: string; }): Promise; /** * @constructor */ constructor(db: firebase.database.Database); getProjectId(): string; /** * Register to the API (implementation). * * Writes an initial record to the database if it is not yet present. * Otherwise only updates the last active timestamp. * * @param {!function(?Error,Object=)} callback * @private */ register(debuggee: Debuggee, callback: (err: Error | null, result?: { debuggee: Debuggee; agentId: string; }) => void): void; /** * Update the server about breakpoint state * @param {!Debuggee} debuggee * @param {!Breakpoint} breakpoint * @param {!Function} callback accepting (err, body) */ updateBreakpoint(debuggee: Debuggee, breakpoint: stackdriver.Breakpoint, callback: (err?: Error, body?: {}) => void): Promise; subscribeToBreakpoints(debuggee: Debuggee, callback: (err: Error | null, breakpoints: stackdriver.Breakpoint[]) => void): void; startMarkingDebuggeeActive(): void; /** * Marks a debuggee as active by prompting the server to update the * lastUpdateTimeUnixMsec to server time. */ markDebuggeeActive(): Promise; stop(): void; }