import { CloudFunction, Event } from '../cloud-functions';
export declare function database(database?: string): DatabaseBuilder;
export declare function namespace(namespace: string): NamespaceBuilder;
export declare function document(path: string): DocumentBuilder;
export declare class DatabaseBuilder {
    private resource;
    namespace(namespace: string): NamespaceBuilder;
    document(path: string): DocumentBuilder;
}
export declare class NamespaceBuilder {
    private resource;
    document(path: string): DocumentBuilder;
}
export declare class DocumentBuilder {
    private resource;
    /** Respond to all document writes (creates, updates, or deletes). */
    onWrite(handler: (event: Event<DeltaDocumentSnapshot>) => PromiseLike<any> | any): CloudFunction<DeltaDocumentSnapshot>;
    /** Respond only to document creations. */
    onCreate(handler: (event: Event<DeltaDocumentSnapshot>) => PromiseLike<any> | any): CloudFunction<DeltaDocumentSnapshot>;
    /** Respond only to document updates. */
    onUpdate(handler: (event: Event<DeltaDocumentSnapshot>) => PromiseLike<any> | any): CloudFunction<DeltaDocumentSnapshot>;
    /** Respond only to document deletions. */
    onDelete(handler: (event: Event<DeltaDocumentSnapshot>) => PromiseLike<any> | any): CloudFunction<DeltaDocumentSnapshot>;
    private onOperation(handler, eventType);
}
export declare class DeltaDocumentSnapshot {
    private _raw;
    private _old;
    private _data;
    private _previous;
    constructor(_raw: object, _old: object);
    data(): object;
    get(key: string): any;
    readonly previous: DeltaDocumentSnapshot;
    private _transformField(field);
}
