@google-cloud/firestore
Version:
Firestore Client Library for Node.js
1,242 lines (987 loc) • 423 kB
TypeScript
/*!
* Copyright 2024 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 * as $protobuf from "protobufjs";
/** Namespace firestore. */
export namespace firestore {
/** Properties of a BundledQuery. */
interface IBundledQuery {
/** BundledQuery parent */
parent?: (string|null);
/** BundledQuery structuredQuery */
structuredQuery?: (google.firestore.v1.IStructuredQuery|null);
/** BundledQuery limitType */
limitType?: (firestore.BundledQuery.LimitType|null);
}
/** Represents a BundledQuery. */
class BundledQuery implements IBundledQuery {
/**
* Constructs a new BundledQuery.
* @param [properties] Properties to set
*/
constructor(properties?: firestore.IBundledQuery);
/** BundledQuery parent. */
public parent: string;
/** BundledQuery structuredQuery. */
public structuredQuery?: (google.firestore.v1.IStructuredQuery|null);
/** BundledQuery limitType. */
public limitType: firestore.BundledQuery.LimitType;
/** BundledQuery queryType. */
public queryType?: "structuredQuery";
/**
* Creates a BundledQuery message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BundledQuery
*/
public static fromObject(object: { [k: string]: any }): firestore.BundledQuery;
/**
* Creates a plain object from a BundledQuery message. Also converts values to other types if specified.
* @param message BundledQuery
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: firestore.BundledQuery, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this BundledQuery to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for BundledQuery
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace BundledQuery {
/** LimitType enum. */
type LimitType =
"FIRST"| "LAST";
}
/** Properties of a NamedQuery. */
interface INamedQuery {
/** NamedQuery name */
name?: (string|null);
/** NamedQuery bundledQuery */
bundledQuery?: (firestore.IBundledQuery|null);
/** NamedQuery readTime */
readTime?: (google.protobuf.ITimestamp|null);
}
/** Represents a NamedQuery. */
class NamedQuery implements INamedQuery {
/**
* Constructs a new NamedQuery.
* @param [properties] Properties to set
*/
constructor(properties?: firestore.INamedQuery);
/** NamedQuery name. */
public name: string;
/** NamedQuery bundledQuery. */
public bundledQuery?: (firestore.IBundledQuery|null);
/** NamedQuery readTime. */
public readTime?: (google.protobuf.ITimestamp|null);
/**
* Creates a NamedQuery message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns NamedQuery
*/
public static fromObject(object: { [k: string]: any }): firestore.NamedQuery;
/**
* Creates a plain object from a NamedQuery message. Also converts values to other types if specified.
* @param message NamedQuery
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: firestore.NamedQuery, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this NamedQuery to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for NamedQuery
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a BundledDocumentMetadata. */
interface IBundledDocumentMetadata {
/** BundledDocumentMetadata name */
name?: (string|null);
/** BundledDocumentMetadata readTime */
readTime?: (google.protobuf.ITimestamp|null);
/** BundledDocumentMetadata exists */
exists?: (boolean|null);
/** BundledDocumentMetadata queries */
queries?: (string[]|null);
}
/** Represents a BundledDocumentMetadata. */
class BundledDocumentMetadata implements IBundledDocumentMetadata {
/**
* Constructs a new BundledDocumentMetadata.
* @param [properties] Properties to set
*/
constructor(properties?: firestore.IBundledDocumentMetadata);
/** BundledDocumentMetadata name. */
public name: string;
/** BundledDocumentMetadata readTime. */
public readTime?: (google.protobuf.ITimestamp|null);
/** BundledDocumentMetadata exists. */
public exists: boolean;
/** BundledDocumentMetadata queries. */
public queries: string[];
/**
* Creates a BundledDocumentMetadata message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BundledDocumentMetadata
*/
public static fromObject(object: { [k: string]: any }): firestore.BundledDocumentMetadata;
/**
* Creates a plain object from a BundledDocumentMetadata message. Also converts values to other types if specified.
* @param message BundledDocumentMetadata
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: firestore.BundledDocumentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this BundledDocumentMetadata to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for BundledDocumentMetadata
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a BundleMetadata. */
interface IBundleMetadata {
/** BundleMetadata id */
id?: (string|null);
/** BundleMetadata createTime */
createTime?: (google.protobuf.ITimestamp|null);
/** BundleMetadata version */
version?: (number|null);
/** BundleMetadata totalDocuments */
totalDocuments?: (number|null);
/** BundleMetadata totalBytes */
totalBytes?: (number|string|null);
}
/** Represents a BundleMetadata. */
class BundleMetadata implements IBundleMetadata {
/**
* Constructs a new BundleMetadata.
* @param [properties] Properties to set
*/
constructor(properties?: firestore.IBundleMetadata);
/** BundleMetadata id. */
public id: string;
/** BundleMetadata createTime. */
public createTime?: (google.protobuf.ITimestamp|null);
/** BundleMetadata version. */
public version: number;
/** BundleMetadata totalDocuments. */
public totalDocuments: number;
/** BundleMetadata totalBytes. */
public totalBytes: (number|string);
/**
* Creates a BundleMetadata message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BundleMetadata
*/
public static fromObject(object: { [k: string]: any }): firestore.BundleMetadata;
/**
* Creates a plain object from a BundleMetadata message. Also converts values to other types if specified.
* @param message BundleMetadata
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: firestore.BundleMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this BundleMetadata to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for BundleMetadata
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a BundleElement. */
interface IBundleElement {
/** BundleElement metadata */
metadata?: (firestore.IBundleMetadata|null);
/** BundleElement namedQuery */
namedQuery?: (firestore.INamedQuery|null);
/** BundleElement documentMetadata */
documentMetadata?: (firestore.IBundledDocumentMetadata|null);
/** BundleElement document */
document?: (google.firestore.v1.IDocument|null);
}
/** Represents a BundleElement. */
class BundleElement implements IBundleElement {
/**
* Constructs a new BundleElement.
* @param [properties] Properties to set
*/
constructor(properties?: firestore.IBundleElement);
/** BundleElement metadata. */
public metadata?: (firestore.IBundleMetadata|null);
/** BundleElement namedQuery. */
public namedQuery?: (firestore.INamedQuery|null);
/** BundleElement documentMetadata. */
public documentMetadata?: (firestore.IBundledDocumentMetadata|null);
/** BundleElement document. */
public document?: (google.firestore.v1.IDocument|null);
/** BundleElement elementType. */
public elementType?: ("metadata"|"namedQuery"|"documentMetadata"|"document");
/**
* Creates a BundleElement message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BundleElement
*/
public static fromObject(object: { [k: string]: any }): firestore.BundleElement;
/**
* Creates a plain object from a BundleElement message. Also converts values to other types if specified.
* @param message BundleElement
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: firestore.BundleElement, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this BundleElement to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for BundleElement
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
/** Namespace google. */
export namespace google {
/** Namespace firestore. */
namespace firestore {
/** Namespace v1. */
namespace v1 {
/** Properties of an AggregationResult. */
interface IAggregationResult {
/** AggregationResult aggregateFields */
aggregateFields?: ({ [k: string]: google.firestore.v1.IValue }|null);
}
/** Represents an AggregationResult. */
class AggregationResult implements IAggregationResult {
/**
* Constructs a new AggregationResult.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.IAggregationResult);
/** AggregationResult aggregateFields. */
public aggregateFields: { [k: string]: google.firestore.v1.IValue };
/**
* Creates an AggregationResult message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns AggregationResult
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.AggregationResult;
/**
* Creates a plain object from an AggregationResult message. Also converts values to other types if specified.
* @param message AggregationResult
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.AggregationResult, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this AggregationResult to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for AggregationResult
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a Document. */
interface IDocument {
/** Document name */
name?: (string|null);
/** Document fields */
fields?: ({ [k: string]: google.firestore.v1.IValue }|null);
/** Document createTime */
createTime?: (google.protobuf.ITimestamp|null);
/** Document updateTime */
updateTime?: (google.protobuf.ITimestamp|null);
}
/** Represents a Document. */
class Document implements IDocument {
/**
* Constructs a new Document.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.IDocument);
/** Document name. */
public name: string;
/** Document fields. */
public fields: { [k: string]: google.firestore.v1.IValue };
/** Document createTime. */
public createTime?: (google.protobuf.ITimestamp|null);
/** Document updateTime. */
public updateTime?: (google.protobuf.ITimestamp|null);
/**
* Creates a Document message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Document
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.Document;
/**
* Creates a plain object from a Document message. Also converts values to other types if specified.
* @param message Document
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.Document, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Document to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Document
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a Value. */
interface IValue {
/** Value nullValue */
nullValue?: (google.protobuf.NullValue|null);
/** Value booleanValue */
booleanValue?: (boolean|null);
/** Value integerValue */
integerValue?: (number|string|null);
/** Value doubleValue */
doubleValue?: (number|null);
/** Value timestampValue */
timestampValue?: (google.protobuf.ITimestamp|null);
/** Value stringValue */
stringValue?: (string|null);
/** Value bytesValue */
bytesValue?: (Uint8Array|null);
/** Value referenceValue */
referenceValue?: (string|null);
/** Value geoPointValue */
geoPointValue?: (google.type.ILatLng|null);
/** Value arrayValue */
arrayValue?: (google.firestore.v1.IArrayValue|null);
/** Value mapValue */
mapValue?: (google.firestore.v1.IMapValue|null);
}
/** Represents a Value. */
class Value implements IValue {
/**
* Constructs a new Value.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.IValue);
/** Value nullValue. */
public nullValue?: (google.protobuf.NullValue|null);
/** Value booleanValue. */
public booleanValue?: (boolean|null);
/** Value integerValue. */
public integerValue?: (number|string|null);
/** Value doubleValue. */
public doubleValue?: (number|null);
/** Value timestampValue. */
public timestampValue?: (google.protobuf.ITimestamp|null);
/** Value stringValue. */
public stringValue?: (string|null);
/** Value bytesValue. */
public bytesValue?: (Uint8Array|null);
/** Value referenceValue. */
public referenceValue?: (string|null);
/** Value geoPointValue. */
public geoPointValue?: (google.type.ILatLng|null);
/** Value arrayValue. */
public arrayValue?: (google.firestore.v1.IArrayValue|null);
/** Value mapValue. */
public mapValue?: (google.firestore.v1.IMapValue|null);
/** Value valueType. */
public valueType?: ("nullValue"|"booleanValue"|"integerValue"|"doubleValue"|"timestampValue"|"stringValue"|"bytesValue"|"referenceValue"|"geoPointValue"|"arrayValue"|"mapValue");
/**
* Creates a Value message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Value
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.Value;
/**
* Creates a plain object from a Value message. Also converts values to other types if specified.
* @param message Value
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.Value, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Value to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Value
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of an ArrayValue. */
interface IArrayValue {
/** ArrayValue values */
values?: (google.firestore.v1.IValue[]|null);
}
/** Represents an ArrayValue. */
class ArrayValue implements IArrayValue {
/**
* Constructs a new ArrayValue.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.IArrayValue);
/** ArrayValue values. */
public values: google.firestore.v1.IValue[];
/**
* Creates an ArrayValue message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ArrayValue
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.ArrayValue;
/**
* Creates a plain object from an ArrayValue message. Also converts values to other types if specified.
* @param message ArrayValue
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.ArrayValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ArrayValue to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for ArrayValue
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a MapValue. */
interface IMapValue {
/** MapValue fields */
fields?: ({ [k: string]: google.firestore.v1.IValue }|null);
}
/** Represents a MapValue. */
class MapValue implements IMapValue {
/**
* Constructs a new MapValue.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.IMapValue);
/** MapValue fields. */
public fields: { [k: string]: google.firestore.v1.IValue };
/**
* Creates a MapValue message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns MapValue
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.MapValue;
/**
* Creates a plain object from a MapValue message. Also converts values to other types if specified.
* @param message MapValue
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.MapValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this MapValue to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for MapValue
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a BitSequence. */
interface IBitSequence {
/** BitSequence bitmap */
bitmap?: (Uint8Array|null);
/** BitSequence padding */
padding?: (number|null);
}
/** Represents a BitSequence. */
class BitSequence implements IBitSequence {
/**
* Constructs a new BitSequence.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.IBitSequence);
/** BitSequence bitmap. */
public bitmap: Uint8Array;
/** BitSequence padding. */
public padding: number;
/**
* Creates a BitSequence message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BitSequence
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.BitSequence;
/**
* Creates a plain object from a BitSequence message. Also converts values to other types if specified.
* @param message BitSequence
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.BitSequence, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this BitSequence to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for BitSequence
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a BloomFilter. */
interface IBloomFilter {
/** BloomFilter bits */
bits?: (google.firestore.v1.IBitSequence|null);
/** BloomFilter hashCount */
hashCount?: (number|null);
}
/** Represents a BloomFilter. */
class BloomFilter implements IBloomFilter {
/**
* Constructs a new BloomFilter.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.IBloomFilter);
/** BloomFilter bits. */
public bits?: (google.firestore.v1.IBitSequence|null);
/** BloomFilter hashCount. */
public hashCount: number;
/**
* Creates a BloomFilter message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BloomFilter
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.BloomFilter;
/**
* Creates a plain object from a BloomFilter message. Also converts values to other types if specified.
* @param message BloomFilter
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.BloomFilter, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this BloomFilter to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for BloomFilter
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a DocumentMask. */
interface IDocumentMask {
/** DocumentMask fieldPaths */
fieldPaths?: (string[]|null);
}
/** Represents a DocumentMask. */
class DocumentMask implements IDocumentMask {
/**
* Constructs a new DocumentMask.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.IDocumentMask);
/** DocumentMask fieldPaths. */
public fieldPaths: string[];
/**
* Creates a DocumentMask message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns DocumentMask
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.DocumentMask;
/**
* Creates a plain object from a DocumentMask message. Also converts values to other types if specified.
* @param message DocumentMask
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.DocumentMask, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this DocumentMask to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for DocumentMask
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a Precondition. */
interface IPrecondition {
/** Precondition exists */
exists?: (boolean|null);
/** Precondition updateTime */
updateTime?: (google.protobuf.ITimestamp|null);
}
/** Represents a Precondition. */
class Precondition implements IPrecondition {
/**
* Constructs a new Precondition.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.IPrecondition);
/** Precondition exists. */
public exists?: (boolean|null);
/** Precondition updateTime. */
public updateTime?: (google.protobuf.ITimestamp|null);
/** Precondition conditionType. */
public conditionType?: ("exists"|"updateTime");
/**
* Creates a Precondition message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Precondition
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.Precondition;
/**
* Creates a plain object from a Precondition message. Also converts values to other types if specified.
* @param message Precondition
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.Precondition, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Precondition to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Precondition
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a TransactionOptions. */
interface ITransactionOptions {
/** TransactionOptions readOnly */
readOnly?: (google.firestore.v1.TransactionOptions.IReadOnly|null);
/** TransactionOptions readWrite */
readWrite?: (google.firestore.v1.TransactionOptions.IReadWrite|null);
}
/** Represents a TransactionOptions. */
class TransactionOptions implements ITransactionOptions {
/**
* Constructs a new TransactionOptions.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.ITransactionOptions);
/** TransactionOptions readOnly. */
public readOnly?: (google.firestore.v1.TransactionOptions.IReadOnly|null);
/** TransactionOptions readWrite. */
public readWrite?: (google.firestore.v1.TransactionOptions.IReadWrite|null);
/** TransactionOptions mode. */
public mode?: ("readOnly"|"readWrite");
/**
* Creates a TransactionOptions message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns TransactionOptions
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.TransactionOptions;
/**
* Creates a plain object from a TransactionOptions message. Also converts values to other types if specified.
* @param message TransactionOptions
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.TransactionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this TransactionOptions to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for TransactionOptions
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace TransactionOptions {
/** Properties of a ReadWrite. */
interface IReadWrite {
/** ReadWrite retryTransaction */
retryTransaction?: (Uint8Array|null);
}
/** Represents a ReadWrite. */
class ReadWrite implements IReadWrite {
/**
* Constructs a new ReadWrite.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.TransactionOptions.IReadWrite);
/** ReadWrite retryTransaction. */
public retryTransaction: Uint8Array;
/**
* Creates a ReadWrite message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ReadWrite
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.TransactionOptions.ReadWrite;
/**
* Creates a plain object from a ReadWrite message. Also converts values to other types if specified.
* @param message ReadWrite
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.TransactionOptions.ReadWrite, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ReadWrite to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for ReadWrite
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a ReadOnly. */
interface IReadOnly {
/** ReadOnly readTime */
readTime?: (google.protobuf.ITimestamp|null);
}
/** Represents a ReadOnly. */
class ReadOnly implements IReadOnly {
/**
* Constructs a new ReadOnly.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.TransactionOptions.IReadOnly);
/** ReadOnly readTime. */
public readTime?: (google.protobuf.ITimestamp|null);
/** ReadOnly consistencySelector. */
public consistencySelector?: "readTime";
/**
* Creates a ReadOnly message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ReadOnly
*/
public static fromObject(object: { [k: string]: any }): google.firestore.v1.TransactionOptions.ReadOnly;
/**
* Creates a plain object from a ReadOnly message. Also converts values to other types if specified.
* @param message ReadOnly
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.firestore.v1.TransactionOptions.ReadOnly, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ReadOnly to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for ReadOnly
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
/** Represents a Firestore */
class Firestore extends $protobuf.rpc.Service {
/**
* Constructs a new Firestore service.
* @param rpcImpl RPC implementation
* @param [requestDelimited=false] Whether requests are length-delimited
* @param [responseDelimited=false] Whether responses are length-delimited
*/
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
/**
* Calls GetDocument.
* @param request GetDocumentRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Document
*/
public getDocument(request: google.firestore.v1.IGetDocumentRequest, callback: google.firestore.v1.Firestore.GetDocumentCallback): void;
/**
* Calls GetDocument.
* @param request GetDocumentRequest message or plain object
* @returns Promise
*/
public getDocument(request: google.firestore.v1.IGetDocumentRequest): Promise<google.firestore.v1.Document>;
/**
* Calls ListDocuments.
* @param request ListDocumentsRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ListDocumentsResponse
*/
public listDocuments(request: google.firestore.v1.IListDocumentsRequest, callback: google.firestore.v1.Firestore.ListDocumentsCallback): void;
/**
* Calls ListDocuments.
* @param request ListDocumentsRequest message or plain object
* @returns Promise
*/
public listDocuments(request: google.firestore.v1.IListDocumentsRequest): Promise<google.firestore.v1.ListDocumentsResponse>;
/**
* Calls UpdateDocument.
* @param request UpdateDocumentRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Document
*/
public updateDocument(request: google.firestore.v1.IUpdateDocumentRequest, callback: google.firestore.v1.Firestore.UpdateDocumentCallback): void;
/**
* Calls UpdateDocument.
* @param request UpdateDocumentRequest message or plain object
* @returns Promise
*/
public updateDocument(request: google.firestore.v1.IUpdateDocumentRequest): Promise<google.firestore.v1.Document>;
/**
* Calls DeleteDocument.
* @param request DeleteDocumentRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Empty
*/
public deleteDocument(request: google.firestore.v1.IDeleteDocumentRequest, callback: google.firestore.v1.Firestore.DeleteDocumentCallback): void;
/**
* Calls DeleteDocument.
* @param request DeleteDocumentRequest message or plain object
* @returns Promise
*/
public deleteDocument(request: google.firestore.v1.IDeleteDocumentRequest): Promise<google.protobuf.Empty>;
/**
* Calls BatchGetDocuments.
* @param request BatchGetDocumentsRequest message or plain object
* @param callback Node-style callback called with the error, if any, and BatchGetDocumentsResponse
*/
public batchGetDocuments(request: google.firestore.v1.IBatchGetDocumentsRequest, callback: google.firestore.v1.Firestore.BatchGetDocumentsCallback): void;
/**
* Calls BatchGetDocuments.
* @param request BatchGetDocumentsRequest message or plain object
* @returns Promise
*/
public batchGetDocuments(request: google.firestore.v1.IBatchGetDocumentsRequest): Promise<google.firestore.v1.BatchGetDocumentsResponse>;
/**
* Calls BeginTransaction.
* @param request BeginTransactionRequest message or plain object
* @param callback Node-style callback called with the error, if any, and BeginTransactionResponse
*/
public beginTransaction(request: google.firestore.v1.IBeginTransactionRequest, callback: google.firestore.v1.Firestore.BeginTransactionCallback): void;
/**
* Calls BeginTransaction.
* @param request BeginTransactionRequest message or plain object
* @returns Promise
*/
public beginTransaction(request: google.firestore.v1.IBeginTransactionRequest): Promise<google.firestore.v1.BeginTransactionResponse>;
/**
* Calls Commit.
* @param request CommitRequest message or plain object
* @param callback Node-style callback called with the error, if any, and CommitResponse
*/
public commit(request: google.firestore.v1.ICommitRequest, callback: google.firestore.v1.Firestore.CommitCallback): void;
/**
* Calls Commit.
* @param request CommitRequest message or plain object
* @returns Promise
*/
public commit(request: google.firestore.v1.ICommitRequest): Promise<google.firestore.v1.CommitResponse>;
/**
* Calls Rollback.
* @param request RollbackRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Empty
*/
public rollback(request: google.firestore.v1.IRollbackRequest, callback: google.firestore.v1.Firestore.RollbackCallback): void;
/**
* Calls Rollback.
* @param request RollbackRequest message or plain object
* @returns Promise
*/
public rollback(request: google.firestore.v1.IRollbackRequest): Promise<google.protobuf.Empty>;
/**
* Calls RunQuery.
* @param request RunQueryRequest message or plain object
* @param callback Node-style callback called with the error, if any, and RunQueryResponse
*/
public runQuery(request: google.firestore.v1.IRunQueryRequest, callback: google.firestore.v1.Firestore.RunQueryCallback): void;
/**
* Calls RunQuery.
* @param request RunQueryRequest message or plain object
* @returns Promise
*/
public runQuery(request: google.firestore.v1.IRunQueryRequest): Promise<google.firestore.v1.RunQueryResponse>;
/**
* Calls RunAggregationQuery.
* @param request RunAggregationQueryRequest message or plain object
* @param callback Node-style callback called with the error, if any, and RunAggregationQueryResponse
*/
public runAggregationQuery(request: google.firestore.v1.IRunAggregationQueryRequest, callback: google.firestore.v1.Firestore.RunAggregationQueryCallback): void;
/**
* Calls RunAggregationQuery.
* @param request RunAggregationQueryRequest message or plain object
* @returns Promise
*/
public runAggregationQuery(request: google.firestore.v1.IRunAggregationQueryRequest): Promise<google.firestore.v1.RunAggregationQueryResponse>;
/**
* Calls PartitionQuery.
* @param request PartitionQueryRequest message or plain object
* @param callback Node-style callback called with the error, if any, and PartitionQueryResponse
*/
public partitionQuery(request: google.firestore.v1.IPartitionQueryRequest, callback: google.firestore.v1.Firestore.PartitionQueryCallback): void;
/**
* Calls PartitionQuery.
* @param request PartitionQueryRequest message or plain object
* @returns Promise
*/
public partitionQuery(request: google.firestore.v1.IPartitionQueryRequest): Promise<google.firestore.v1.PartitionQueryResponse>;
/**
* Calls Write.
* @param request WriteRequest message or plain object
* @param callback Node-style callback called with the error, if any, and WriteResponse
*/
public write(request: google.firestore.v1.IWriteRequest, callback: google.firestore.v1.Firestore.WriteCallback): void;
/**
* Calls Write.
* @param request WriteRequest message or plain object
* @returns Promise
*/
public write(request: google.firestore.v1.IWriteRequest): Promise<google.firestore.v1.WriteResponse>;
/**
* Calls Listen.
* @param re