Firestore

google.firestore.v1beta1. 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.v1beta1.IBatchGetDocumentsRequest

BatchGetDocumentsRequest message or plain object

callback google.firestore.v1beta1.Firestore.BatchGetDocumentsCallback

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

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

Calls BatchGetDocuments.

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

BatchGetDocumentsRequest message or plain object

beginTransaction(request, callback) → {undefined}

Calls BeginTransaction.

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

BeginTransactionRequest message or plain object

callback google.firestore.v1beta1.Firestore.BeginTransactionCallback

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

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

Calls BeginTransaction.

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

BeginTransactionRequest message or plain object

commit(request, callback) → {undefined}

Calls Commit.

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

CommitRequest message or plain object

callback google.firestore.v1beta1.Firestore.CommitCallback

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

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

Calls Commit.

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

CommitRequest message or plain object

createDocument(request, callback) → {undefined}

Calls CreateDocument.

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

CreateDocumentRequest message or plain object

callback google.firestore.v1beta1.Firestore.CreateDocumentCallback

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

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

Calls CreateDocument.

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

CreateDocumentRequest message or plain object

deleteDocument(request, callback) → {undefined}

Calls DeleteDocument.

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

DeleteDocumentRequest message or plain object

callback google.firestore.v1beta1.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.v1beta1.IDeleteDocumentRequest

DeleteDocumentRequest message or plain object

getDocument(request, callback) → {undefined}

Calls GetDocument.

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

GetDocumentRequest message or plain object

callback google.firestore.v1beta1.Firestore.GetDocumentCallback

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

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

Calls GetDocument.

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

GetDocumentRequest message or plain object

listCollectionIds(request, callback) → {undefined}

Calls ListCollectionIds.

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

ListCollectionIdsRequest message or plain object

callback google.firestore.v1beta1.Firestore.ListCollectionIdsCallback

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

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

Calls ListCollectionIds.

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

ListCollectionIdsRequest message or plain object

listDocuments(request, callback) → {undefined}

Calls ListDocuments.

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

ListDocumentsRequest message or plain object

callback google.firestore.v1beta1.Firestore.ListDocumentsCallback

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

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

Calls ListDocuments.

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

ListDocumentsRequest message or plain object

listen(request, callback) → {undefined}

Calls Listen.

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

ListenRequest message or plain object

callback google.firestore.v1beta1.Firestore.ListenCallback

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

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

Calls Listen.

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

ListenRequest message or plain object

rollback(request, callback) → {undefined}

Calls Rollback.

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

RollbackRequest message or plain object

callback google.firestore.v1beta1.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.v1beta1.IRollbackRequest

RollbackRequest message or plain object

runQuery(request, callback) → {undefined}

Calls RunQuery.

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

RunQueryRequest message or plain object

callback google.firestore.v1beta1.Firestore.RunQueryCallback

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

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

Calls RunQuery.

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

RunQueryRequest message or plain object

updateDocument(request, callback) → {undefined}

Calls UpdateDocument.

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

UpdateDocumentRequest message or plain object

callback google.firestore.v1beta1.Firestore.UpdateDocumentCallback

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

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

Calls UpdateDocument.

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

UpdateDocumentRequest message or plain object

write(request, callback) → {undefined}

Calls Write.

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

WriteRequest message or plain object

callback google.firestore.v1beta1.Firestore.WriteCallback

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

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

Calls Write.

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

WriteRequest message or plain object

Type Definitions

BatchGetDocumentsCallback(error, responseopt)

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

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.BatchGetDocumentsResponse <optional>

BatchGetDocumentsResponse

BeginTransactionCallback(error, responseopt)

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

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.BeginTransactionResponse <optional>

BeginTransactionResponse

CommitCallback(error, responseopt)

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

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.CommitResponse <optional>

CommitResponse

CreateDocumentCallback(error, responseopt)

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

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.Document <optional>

Document

DeleteDocumentCallback(error, responseopt)

Callback as used by google.firestore.v1beta1.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.v1beta1.Firestore#getDocument.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.Document <optional>

Document

ListCollectionIdsCallback(error, responseopt)

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

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.ListCollectionIdsResponse <optional>

ListCollectionIdsResponse

ListDocumentsCallback(error, responseopt)

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

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.ListDocumentsResponse <optional>

ListDocumentsResponse

ListenCallback(error, responseopt)

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

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.ListenResponse <optional>

ListenResponse

RollbackCallback(error, responseopt)

Callback as used by google.firestore.v1beta1.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.v1beta1.Firestore#runQuery.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.RunQueryResponse <optional>

RunQueryResponse

UpdateDocumentCallback(error, responseopt)

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

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.Document <optional>

Document

WriteCallback(error, responseopt)

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

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.firestore.v1beta1.WriteResponse <optional>

WriteResponse