Firestore

google.firestore.v1. Firestore

Represents a Firestore

Constructor

new Firestore(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new Firestore service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

batchGetDocuments(request, callback) → {undefined}

Calls BatchGetDocuments.

Parameters:
Name Type Description
request google.firestore.v1.IBatchGetDocumentsRequest

BatchGetDocumentsRequest message or plain object

callback google.firestore.v1.Firestore.BatchGetDocumentsCallback

Node-style callback called with the error, if any, and BatchGetDocumentsResponse

batchGetDocuments(request) → {Promise.<google.firestore.v1.BatchGetDocumentsResponse>}

Calls BatchGetDocuments.

Parameters:
Name Type Description
request google.firestore.v1.IBatchGetDocumentsRequest

BatchGetDocumentsRequest message or plain object

batchWrite(request, callback) → {undefined}

Calls BatchWrite.

Parameters:
Name Type Description
request google.firestore.v1.IBatchWriteRequest

BatchWriteRequest message or plain object

callback google.firestore.v1.Firestore.BatchWriteCallback

Node-style callback called with the error, if any, and BatchWriteResponse

batchWrite(request) → {Promise.<google.firestore.v1.BatchWriteResponse>}

Calls BatchWrite.

Parameters:
Name Type Description
request google.firestore.v1.IBatchWriteRequest

BatchWriteRequest message or plain object

beginTransaction(request, callback) → {undefined}

Calls BeginTransaction.

Parameters:
Name Type Description
request google.firestore.v1.IBeginTransactionRequest

BeginTransactionRequest message or plain object

callback google.firestore.v1.Firestore.BeginTransactionCallback

Node-style callback called with the error, if any, and BeginTransactionResponse

beginTransaction(request) → {Promise.<google.firestore.v1.BeginTransactionResponse>}

Calls BeginTransaction.

Parameters:
Name Type Description
request google.firestore.v1.IBeginTransactionRequest

BeginTransactionRequest message or plain object

commit(request, callback) → {undefined}

Calls Commit.

Parameters:
Name Type Description
request google.firestore.v1.ICommitRequest

CommitRequest message or plain object

callback google.firestore.v1.Firestore.CommitCallback

Node-style callback called with the error, if any, and CommitResponse

commit(request) → {Promise.<google.firestore.v1.CommitResponse>}

Calls Commit.

Parameters:
Name Type Description
request google.firestore.v1.ICommitRequest

CommitRequest message or plain object

createDocument(request, callback) → {undefined}

Calls CreateDocument.

Parameters:
Name Type Description
request google.firestore.v1.ICreateDocumentRequest

CreateDocumentRequest message or plain object

callback google.firestore.v1.Firestore.CreateDocumentCallback

Node-style callback called with the error, if any, and Document

createDocument(request) → {Promise.<google.firestore.v1.Document>}

Calls CreateDocument.

Parameters:
Name Type Description
request google.firestore.v1.ICreateDocumentRequest

CreateDocumentRequest message or plain object

deleteDocument(request, callback) → {undefined}

Calls DeleteDocument.

Parameters:
Name Type Description
request google.firestore.v1.IDeleteDocumentRequest

DeleteDocumentRequest message or plain object

callback google.firestore.v1.Firestore.DeleteDocumentCallback

Node-style callback called with the error, if any, and Empty

deleteDocument(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteDocument.

Parameters:
Name Type Description
request google.firestore.v1.IDeleteDocumentRequest

DeleteDocumentRequest message or plain object

getDocument(request, callback) → {undefined}

Calls GetDocument.

Parameters:
Name Type Description
request google.firestore.v1.IGetDocumentRequest

GetDocumentRequest message or plain object

callback google.firestore.v1.Firestore.GetDocumentCallback

Node-style callback called with the error, if any, and Document

getDocument(request) → {Promise.<google.firestore.v1.Document>}

Calls GetDocument.

Parameters:
Name Type Description
request google.firestore.v1.IGetDocumentRequest

GetDocumentRequest message or plain object

listCollectionIds(request, callback) → {undefined}

Calls ListCollectionIds.

Parameters:
Name Type Description
request google.firestore.v1.IListCollectionIdsRequest

ListCollectionIdsRequest message or plain object

callback google.firestore.v1.Firestore.ListCollectionIdsCallback

Node-style callback called with the error, if any, and ListCollectionIdsResponse

listCollectionIds(request) → {Promise.<google.firestore.v1.ListCollectionIdsResponse>}

Calls ListCollectionIds.

Parameters:
Name Type Description
request google.firestore.v1.IListCollectionIdsRequest

ListCollectionIdsRequest message or plain object

listDocuments(request, callback) → {undefined}

Calls ListDocuments.

Parameters:
Name Type Description
request google.firestore.v1.IListDocumentsRequest

ListDocumentsRequest message or plain object

callback google.firestore.v1.Firestore.ListDocumentsCallback

Node-style callback called with the error, if any, and ListDocumentsResponse

listDocuments(request) → {Promise.<google.firestore.v1.ListDocumentsResponse>}

Calls ListDocuments.

Parameters:
Name Type Description
request google.firestore.v1.IListDocumentsRequest

ListDocumentsRequest message or plain object

listen(request, callback) → {undefined}

Calls Listen.

Parameters:
Name Type Description
request google.firestore.v1.IListenRequest

ListenRequest message or plain object

callback google.firestore.v1.Firestore.ListenCallback

Node-style callback called with the error, if any, and ListenResponse

listen(request) → {Promise.<google.firestore.v1.ListenResponse>}

Calls Listen.

Parameters:
Name Type Description
request google.firestore.v1.IListenRequest

ListenRequest message or plain object

partitionQuery(request, callback) → {undefined}

Calls PartitionQuery.

Parameters:
Name Type Description
request google.firestore.v1.IPartitionQueryRequest

PartitionQueryRequest message or plain object

callback google.firestore.v1.Firestore.PartitionQueryCallback

Node-style callback called with the error, if any, and PartitionQueryResponse

partitionQuery(request) → {Promise.<google.firestore.v1.PartitionQueryResponse>}

Calls PartitionQuery.

Parameters:
Name Type Description
request google.firestore.v1.IPartitionQueryRequest

PartitionQueryRequest message or plain object

rollback(request, callback) → {undefined}

Calls Rollback.

Parameters:
Name Type Description
request google.firestore.v1.IRollbackRequest

RollbackRequest message or plain object

callback google.firestore.v1.Firestore.RollbackCallback

Node-style callback called with the error, if any, and Empty

rollback(request) → {Promise.<google.protobuf.Empty>}

Calls Rollback.

Parameters:
Name Type Description
request google.firestore.v1.IRollbackRequest

RollbackRequest message or plain object

runQuery(request, callback) → {undefined}

Calls RunQuery.

Parameters:
Name Type Description
request google.firestore.v1.IRunQueryRequest

RunQueryRequest message or plain object

callback google.firestore.v1.Firestore.RunQueryCallback

Node-style callback called with the error, if any, and RunQueryResponse

runQuery(request) → {Promise.<google.firestore.v1.RunQueryResponse>}

Calls RunQuery.

Parameters:
Name Type Description
request google.firestore.v1.IRunQueryRequest

RunQueryRequest message or plain object

updateDocument(request, callback) → {undefined}

Calls UpdateDocument.

Parameters:
Name Type Description
request google.firestore.v1.IUpdateDocumentRequest

UpdateDocumentRequest message or plain object

callback google.firestore.v1.Firestore.UpdateDocumentCallback

Node-style callback called with the error, if any, and Document

updateDocument(request) → {Promise.<google.firestore.v1.Document>}

Calls UpdateDocument.

Parameters:
Name Type Description
request google.firestore.v1.IUpdateDocumentRequest

UpdateDocumentRequest message or plain object

write(request, callback) → {undefined}

Calls Write.

Parameters:
Name Type Description
request google.firestore.v1.IWriteRequest

WriteRequest message or plain object

callback google.firestore.v1.Firestore.WriteCallback

Node-style callback called with the error, if any, and WriteResponse

write(request) → {Promise.<google.firestore.v1.WriteResponse>}

Calls Write.

Parameters:
Name Type Description
request google.firestore.v1.IWriteRequest

WriteRequest message or plain object

Type Definitions

BatchGetDocumentsCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#batchGetDocuments.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.BatchGetDocumentsResponse <optional>

BatchGetDocumentsResponse

BatchWriteCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#batchWrite.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.BatchWriteResponse <optional>

BatchWriteResponse

BeginTransactionCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#beginTransaction.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.BeginTransactionResponse <optional>

BeginTransactionResponse

CommitCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#commit.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.CommitResponse <optional>

CommitResponse

CreateDocumentCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#createDocument.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.Document <optional>

Document

DeleteDocumentCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#deleteDocument.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

GetDocumentCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#getDocument.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.Document <optional>

Document

ListCollectionIdsCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#listCollectionIds.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.ListCollectionIdsResponse <optional>

ListCollectionIdsResponse

ListDocumentsCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#listDocuments.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.ListDocumentsResponse <optional>

ListDocumentsResponse

ListenCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#listen.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.ListenResponse <optional>

ListenResponse

PartitionQueryCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#partitionQuery.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.PartitionQueryResponse <optional>

PartitionQueryResponse

RollbackCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#rollback.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

RunQueryCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#runQuery.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.RunQueryResponse <optional>

RunQueryResponse

UpdateDocumentCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#updateDocument.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.Document <optional>

Document

WriteCallback(error, responseopt)

Callback as used by google.firestore.v1.Firestore#write.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1.WriteResponse <optional>

WriteResponse