1 | /**
|
2 | * @license
|
3 | * Copyright 2017 Google LLC
|
4 | *
|
5 | * Licensed under the Apache License, Version 2.0 (the "License");
|
6 | * you may not use this file except in compliance with the License.
|
7 | * You may obtain a copy of the License at
|
8 | *
|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
10 | *
|
11 | * Unless required by applicable law or agreed to in writing, software
|
12 | * distributed under the License is distributed on an "AS IS" BASIS,
|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 | * See the License for the specific language governing permissions and
|
15 | * limitations under the License.
|
16 | */
|
17 | import { FirebaseApp } from '@firebase/app-types';
|
18 | import { FirebaseAuthInternal } from '@firebase/auth-interop-types';
|
19 | import * as types from '@firebase/database-types';
|
20 | import { Reference } from './Reference';
|
21 | /**
|
22 | * INTERNAL methods for internal-use only (tests, etc.).
|
23 | *
|
24 | * Customers shouldn't use these or else should be aware that they could break at any time.
|
25 | */
|
26 | export declare const forceLongPolling: () => void;
|
27 | export declare const forceWebSockets: () => void;
|
28 | export declare const isWebSocketsAvailable: () => boolean;
|
29 | export declare const setSecurityDebugCallback: (ref: Reference, callback: (a: object) => void) => void;
|
30 | export declare const stats: (ref: Reference, showDelta?: boolean) => void;
|
31 | export declare const statsIncrementCounter: (ref: Reference, metric: string) => void;
|
32 | export declare const dataUpdateCount: (ref: Reference) => number;
|
33 | export declare const interceptServerData: (ref: Reference, callback: (a: string, b: unknown) => void) => void;
|
34 | /**
|
35 | * Used by console to create a database based on the app,
|
36 | * passed database URL and a custom auth implementation.
|
37 | *
|
38 | * @param app - A valid FirebaseApp-like object
|
39 | * @param url - A valid Firebase databaseURL
|
40 | * @param version - custom version e.g. firebase-admin version
|
41 | * @param customAuthImpl - custom auth implementation
|
42 | */
|
43 | export declare function initStandalone<T>({ app, url, version, customAuthImpl, namespace, nodeAdmin }: {
|
44 | app: FirebaseApp;
|
45 | url: string;
|
46 | version: string;
|
47 | customAuthImpl: FirebaseAuthInternal;
|
48 | namespace: T;
|
49 | nodeAdmin?: boolean;
|
50 | }): {
|
51 | instance: types.Database;
|
52 | namespace: T;
|
53 | };
|