UNPKG

@firebase/firestore

Version:

The Cloud Firestore component of the Firebase JS SDK.

64 lines (63 loc) 2.57 kB
/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { CredentialsSettings } from '../api/credentials'; export declare const DEFAULT_HOST = "firestore.googleapis.com"; export declare const DEFAULT_SSL = true; /** * Specifies custom configurations for your Cloud Firestore instance. * You must set these before invoking any other methods. */ export interface Settings { /** The hostname to connect to. */ host?: string; /** Whether to use SSL when connecting. */ ssl?: boolean; /** * Whether to skip nested properties that are set to `undefined` during * object serialization. If set to `true`, these properties are skipped * and not written to Firestore. If set to `false` or omitted, the SDK * throws an exception when it encounters properties of type `undefined`. */ ignoreUndefinedProperties?: boolean; } /** Undocumented, private additional settings not exposed in our public API. */ export interface PrivateSettings extends Settings { credentials?: CredentialsSettings; cacheSizeBytes?: number; experimentalForceLongPolling?: boolean; experimentalAutoDetectLongPolling?: boolean; useFetchStreams?: boolean; } /** * A concrete type describing all the values that can be applied via a * user-supplied firestore.Settings object. This is a separate type so that * defaults can be supplied and the value can be checked for equality. */ export declare class FirestoreSettings { /** The hostname to connect to. */ readonly host: string; /** Whether to use SSL when connecting. */ readonly ssl: boolean; readonly cacheSizeBytes: number; readonly experimentalForceLongPolling: boolean; readonly experimentalAutoDetectLongPolling: boolean; readonly ignoreUndefinedProperties: boolean; readonly useFetchStreams: boolean; credentials?: any; constructor(settings: PrivateSettings); isEqual(other: FirestoreSettings): boolean; }