@google-cloud/firestore-api 0.1.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,930 +0,0 @@
1
- import type * as gax from 'google-gax';
2
- import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
3
- import { Transform } from 'stream';
4
- import * as protos from '../../protos/protos';
5
- /**
6
- * The Cloud Firestore service.
7
- *
8
- * Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL
9
- * document database that simplifies storing, syncing, and querying data for
10
- * your mobile, web, and IoT apps at global scale. Its client libraries provide
11
- * live synchronization and offline support, while its security features and
12
- * integrations with Firebase and Google Cloud Platform (GCP) accelerate
13
- * building truly serverless apps.
14
- * @class
15
- * @memberof v1beta1
16
- */
17
- export declare class FirestoreClient {
18
- private _terminated;
19
- private _opts;
20
- private _providedCustomServicePath;
21
- private _gaxModule;
22
- private _gaxGrpc;
23
- private _protos;
24
- private _defaults;
25
- private _universeDomain;
26
- private _servicePath;
27
- private _log;
28
- auth: gax.GoogleAuth;
29
- descriptors: Descriptors;
30
- warn: (code: string, message: string, warnType?: string) => void;
31
- innerApiCalls: {
32
- [name: string]: Function;
33
- };
34
- firestoreStub?: Promise<{
35
- [name: string]: Function;
36
- }>;
37
- /**
38
- * Construct an instance of FirestoreClient.
39
- *
40
- * @param {object} [options] - The configuration object.
41
- * The options accepted by the constructor are described in detail
42
- * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
43
- * The common options are:
44
- * @param {object} [options.credentials] - Credentials object.
45
- * @param {string} [options.credentials.client_email]
46
- * @param {string} [options.credentials.private_key]
47
- * @param {string} [options.email] - Account email address. Required when
48
- * using a .pem or .p12 keyFilename.
49
- * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
50
- * .p12 key downloaded from the Google Developers Console. If you provide
51
- * a path to a JSON file, the projectId option below is not necessary.
52
- * NOTE: .pem and .p12 require you to specify options.email as well.
53
- * @param {number} [options.port] - The port on which to connect to
54
- * the remote host.
55
- * @param {string} [options.projectId] - The project ID from the Google
56
- * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
57
- * the environment variable GCLOUD_PROJECT for your project ID. If your
58
- * app is running in an environment which supports
59
- * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
60
- * your project ID will be detected automatically.
61
- * @param {string} [options.apiEndpoint] - The domain name of the
62
- * API remote host.
63
- * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
64
- * Follows the structure of {@link gapicConfig}.
65
- * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
66
- * For more information, please check the
67
- * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
68
- * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
69
- * need to avoid loading the default gRPC version and want to use the fallback
70
- * HTTP implementation. Load only fallback version and pass it to the constructor:
71
- * ```
72
- * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
73
- * const client = new FirestoreClient({fallback: true}, gax);
74
- * ```
75
- */
76
- constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
77
- /**
78
- * Initialize the client.
79
- * Performs asynchronous operations (such as authentication) and prepares the client.
80
- * This function will be called automatically when any class method is called for the
81
- * first time, but if you need to initialize it before calling an actual method,
82
- * feel free to call initialize() directly.
83
- *
84
- * You can await on this method if you want to make sure the client is initialized.
85
- *
86
- * @returns {Promise} A promise that resolves to an authenticated service stub.
87
- */
88
- initialize(): Promise<{
89
- [name: string]: Function;
90
- }>;
91
- /**
92
- * The DNS address for this API service.
93
- * @deprecated Use the apiEndpoint method of the client instance.
94
- * @returns {string} The DNS address for this service.
95
- */
96
- static get servicePath(): string;
97
- /**
98
- * The DNS address for this API service - same as servicePath.
99
- * @deprecated Use the apiEndpoint method of the client instance.
100
- * @returns {string} The DNS address for this service.
101
- */
102
- static get apiEndpoint(): string;
103
- /**
104
- * The DNS address for this API service.
105
- * @returns {string} The DNS address for this service.
106
- */
107
- get apiEndpoint(): string;
108
- get universeDomain(): string;
109
- /**
110
- * The port for this API service.
111
- * @returns {number} The default port for this service.
112
- */
113
- static get port(): number;
114
- /**
115
- * The scopes needed to make gRPC calls for every method defined
116
- * in this service.
117
- * @returns {string[]} List of default scopes.
118
- */
119
- static get scopes(): string[];
120
- getProjectId(): Promise<string>;
121
- getProjectId(callback: Callback<string, undefined, undefined>): void;
122
- /**
123
- * Gets a single document.
124
- *
125
- * @param {Object} request
126
- * The request object that will be sent.
127
- * @param {string} request.name
128
- * Required. The resource name of the Document to get. In the format:
129
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
130
- * @param {google.firestore.v1beta1.DocumentMask} request.mask
131
- * The fields to return. If not set, returns all fields.
132
- *
133
- * If the document has a field that is not present in this mask, that field
134
- * will not be returned in the response.
135
- * @param {Buffer} request.transaction
136
- * Reads the document in a transaction.
137
- * @param {google.protobuf.Timestamp} request.readTime
138
- * Reads the version of the document at the given time.
139
- * This may not be older than 270 seconds.
140
- * @param {object} [options]
141
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
142
- * @returns {Promise} - The promise which resolves to an array.
143
- * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.Document|Document}.
144
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
145
- * for more details and examples.
146
- * @example <caption>include:samples/generated/v1beta1/firestore.get_document.js</caption>
147
- * region_tag:firestore_v1beta1_generated_Firestore_GetDocument_async
148
- */
149
- getDocument(request?: protos.google.firestore.v1beta1.IGetDocumentRequest, options?: CallOptions): Promise<[
150
- protos.google.firestore.v1beta1.IDocument,
151
- protos.google.firestore.v1beta1.IGetDocumentRequest | undefined,
152
- {} | undefined
153
- ]>;
154
- getDocument(request: protos.google.firestore.v1beta1.IGetDocumentRequest, options: CallOptions, callback: Callback<protos.google.firestore.v1beta1.IDocument, protos.google.firestore.v1beta1.IGetDocumentRequest | null | undefined, {} | null | undefined>): void;
155
- getDocument(request: protos.google.firestore.v1beta1.IGetDocumentRequest, callback: Callback<protos.google.firestore.v1beta1.IDocument, protos.google.firestore.v1beta1.IGetDocumentRequest | null | undefined, {} | null | undefined>): void;
156
- /**
157
- * Updates or inserts a document.
158
- *
159
- * @param {Object} request
160
- * The request object that will be sent.
161
- * @param {google.firestore.v1beta1.Document} request.document
162
- * Required. The updated document.
163
- * Creates the document if it does not already exist.
164
- * @param {google.firestore.v1beta1.DocumentMask} request.updateMask
165
- * The fields to update.
166
- * None of the field paths in the mask may contain a reserved name.
167
- *
168
- * If the document exists on the server and has fields not referenced in the
169
- * mask, they are left unchanged.
170
- * Fields referenced in the mask, but not present in the input document, are
171
- * deleted from the document on the server.
172
- * @param {google.firestore.v1beta1.DocumentMask} request.mask
173
- * The fields to return. If not set, returns all fields.
174
- *
175
- * If the document has a field that is not present in this mask, that field
176
- * will not be returned in the response.
177
- * @param {google.firestore.v1beta1.Precondition} request.currentDocument
178
- * An optional precondition on the document.
179
- * The request will fail if this is set and not met by the target document.
180
- * @param {object} [options]
181
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
182
- * @returns {Promise} - The promise which resolves to an array.
183
- * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.Document|Document}.
184
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
185
- * for more details and examples.
186
- * @example <caption>include:samples/generated/v1beta1/firestore.update_document.js</caption>
187
- * region_tag:firestore_v1beta1_generated_Firestore_UpdateDocument_async
188
- */
189
- updateDocument(request?: protos.google.firestore.v1beta1.IUpdateDocumentRequest, options?: CallOptions): Promise<[
190
- protos.google.firestore.v1beta1.IDocument,
191
- protos.google.firestore.v1beta1.IUpdateDocumentRequest | undefined,
192
- {} | undefined
193
- ]>;
194
- updateDocument(request: protos.google.firestore.v1beta1.IUpdateDocumentRequest, options: CallOptions, callback: Callback<protos.google.firestore.v1beta1.IDocument, protos.google.firestore.v1beta1.IUpdateDocumentRequest | null | undefined, {} | null | undefined>): void;
195
- updateDocument(request: protos.google.firestore.v1beta1.IUpdateDocumentRequest, callback: Callback<protos.google.firestore.v1beta1.IDocument, protos.google.firestore.v1beta1.IUpdateDocumentRequest | null | undefined, {} | null | undefined>): void;
196
- /**
197
- * Deletes a document.
198
- *
199
- * @param {Object} request
200
- * The request object that will be sent.
201
- * @param {string} request.name
202
- * Required. The resource name of the Document to delete. In the format:
203
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
204
- * @param {google.firestore.v1beta1.Precondition} request.currentDocument
205
- * An optional precondition on the document.
206
- * The request will fail if this is set and not met by the target document.
207
- * @param {object} [options]
208
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
209
- * @returns {Promise} - The promise which resolves to an array.
210
- * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
211
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
212
- * for more details and examples.
213
- * @example <caption>include:samples/generated/v1beta1/firestore.delete_document.js</caption>
214
- * region_tag:firestore_v1beta1_generated_Firestore_DeleteDocument_async
215
- */
216
- deleteDocument(request?: protos.google.firestore.v1beta1.IDeleteDocumentRequest, options?: CallOptions): Promise<[
217
- protos.google.protobuf.IEmpty,
218
- protos.google.firestore.v1beta1.IDeleteDocumentRequest | undefined,
219
- {} | undefined
220
- ]>;
221
- deleteDocument(request: protos.google.firestore.v1beta1.IDeleteDocumentRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.firestore.v1beta1.IDeleteDocumentRequest | null | undefined, {} | null | undefined>): void;
222
- deleteDocument(request: protos.google.firestore.v1beta1.IDeleteDocumentRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.firestore.v1beta1.IDeleteDocumentRequest | null | undefined, {} | null | undefined>): void;
223
- /**
224
- * Starts a new transaction.
225
- *
226
- * @param {Object} request
227
- * The request object that will be sent.
228
- * @param {string} request.database
229
- * Required. The database name. In the format:
230
- * `projects/{project_id}/databases/{database_id}`.
231
- * @param {google.firestore.v1beta1.TransactionOptions} request.options
232
- * The options for the transaction.
233
- * Defaults to a read-write transaction.
234
- * @param {object} [options]
235
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
236
- * @returns {Promise} - The promise which resolves to an array.
237
- * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.BeginTransactionResponse|BeginTransactionResponse}.
238
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
239
- * for more details and examples.
240
- * @example <caption>include:samples/generated/v1beta1/firestore.begin_transaction.js</caption>
241
- * region_tag:firestore_v1beta1_generated_Firestore_BeginTransaction_async
242
- */
243
- beginTransaction(request?: protos.google.firestore.v1beta1.IBeginTransactionRequest, options?: CallOptions): Promise<[
244
- protos.google.firestore.v1beta1.IBeginTransactionResponse,
245
- protos.google.firestore.v1beta1.IBeginTransactionRequest | undefined,
246
- {} | undefined
247
- ]>;
248
- beginTransaction(request: protos.google.firestore.v1beta1.IBeginTransactionRequest, options: CallOptions, callback: Callback<protos.google.firestore.v1beta1.IBeginTransactionResponse, protos.google.firestore.v1beta1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
249
- beginTransaction(request: protos.google.firestore.v1beta1.IBeginTransactionRequest, callback: Callback<protos.google.firestore.v1beta1.IBeginTransactionResponse, protos.google.firestore.v1beta1.IBeginTransactionRequest | null | undefined, {} | null | undefined>): void;
250
- /**
251
- * Commits a transaction, while optionally updating documents.
252
- *
253
- * @param {Object} request
254
- * The request object that will be sent.
255
- * @param {string} request.database
256
- * Required. The database name. In the format:
257
- * `projects/{project_id}/databases/{database_id}`.
258
- * @param {number[]} request.writes
259
- * The writes to apply.
260
- *
261
- * Always executed atomically and in order.
262
- * @param {Buffer} request.transaction
263
- * If set, applies all writes in this transaction, and commits it.
264
- * @param {object} [options]
265
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
266
- * @returns {Promise} - The promise which resolves to an array.
267
- * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.CommitResponse|CommitResponse}.
268
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
269
- * for more details and examples.
270
- * @example <caption>include:samples/generated/v1beta1/firestore.commit.js</caption>
271
- * region_tag:firestore_v1beta1_generated_Firestore_Commit_async
272
- */
273
- commit(request?: protos.google.firestore.v1beta1.ICommitRequest, options?: CallOptions): Promise<[
274
- protos.google.firestore.v1beta1.ICommitResponse,
275
- protos.google.firestore.v1beta1.ICommitRequest | undefined,
276
- {} | undefined
277
- ]>;
278
- commit(request: protos.google.firestore.v1beta1.ICommitRequest, options: CallOptions, callback: Callback<protos.google.firestore.v1beta1.ICommitResponse, protos.google.firestore.v1beta1.ICommitRequest | null | undefined, {} | null | undefined>): void;
279
- commit(request: protos.google.firestore.v1beta1.ICommitRequest, callback: Callback<protos.google.firestore.v1beta1.ICommitResponse, protos.google.firestore.v1beta1.ICommitRequest | null | undefined, {} | null | undefined>): void;
280
- /**
281
- * Rolls back a transaction.
282
- *
283
- * @param {Object} request
284
- * The request object that will be sent.
285
- * @param {string} request.database
286
- * Required. The database name. In the format:
287
- * `projects/{project_id}/databases/{database_id}`.
288
- * @param {Buffer} request.transaction
289
- * Required. The transaction to roll back.
290
- * @param {object} [options]
291
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
292
- * @returns {Promise} - The promise which resolves to an array.
293
- * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
294
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
295
- * for more details and examples.
296
- * @example <caption>include:samples/generated/v1beta1/firestore.rollback.js</caption>
297
- * region_tag:firestore_v1beta1_generated_Firestore_Rollback_async
298
- */
299
- rollback(request?: protos.google.firestore.v1beta1.IRollbackRequest, options?: CallOptions): Promise<[
300
- protos.google.protobuf.IEmpty,
301
- protos.google.firestore.v1beta1.IRollbackRequest | undefined,
302
- {} | undefined
303
- ]>;
304
- rollback(request: protos.google.firestore.v1beta1.IRollbackRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.firestore.v1beta1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
305
- rollback(request: protos.google.firestore.v1beta1.IRollbackRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.firestore.v1beta1.IRollbackRequest | null | undefined, {} | null | undefined>): void;
306
- /**
307
- * Applies a batch of write operations.
308
- *
309
- * The BatchWrite method does not apply the write operations atomically
310
- * and can apply them out of order. Method does not allow more than one write
311
- * per document. Each write succeeds or fails independently. See the
312
- * {@link protos.google.firestore.v1beta1.BatchWriteResponse|BatchWriteResponse} for the success status of each write.
313
- *
314
- * If you require an atomically applied set of writes, use
315
- * {@link protos.google.firestore.v1beta1.Firestore.Commit|Commit} instead.
316
- *
317
- * @param {Object} request
318
- * The request object that will be sent.
319
- * @param {string} request.database
320
- * Required. The database name. In the format:
321
- * `projects/{project_id}/databases/{database_id}`.
322
- * @param {number[]} request.writes
323
- * The writes to apply.
324
- *
325
- * Method does not apply writes atomically and does not guarantee ordering.
326
- * Each write succeeds or fails independently. You cannot write to the same
327
- * document more than once per request.
328
- * @param {number[]} request.labels
329
- * Labels associated with this batch write.
330
- * @param {object} [options]
331
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
332
- * @returns {Promise} - The promise which resolves to an array.
333
- * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.BatchWriteResponse|BatchWriteResponse}.
334
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
335
- * for more details and examples.
336
- * @example <caption>include:samples/generated/v1beta1/firestore.batch_write.js</caption>
337
- * region_tag:firestore_v1beta1_generated_Firestore_BatchWrite_async
338
- */
339
- batchWrite(request?: protos.google.firestore.v1beta1.IBatchWriteRequest, options?: CallOptions): Promise<[
340
- protos.google.firestore.v1beta1.IBatchWriteResponse,
341
- protos.google.firestore.v1beta1.IBatchWriteRequest | undefined,
342
- {} | undefined
343
- ]>;
344
- batchWrite(request: protos.google.firestore.v1beta1.IBatchWriteRequest, options: CallOptions, callback: Callback<protos.google.firestore.v1beta1.IBatchWriteResponse, protos.google.firestore.v1beta1.IBatchWriteRequest | null | undefined, {} | null | undefined>): void;
345
- batchWrite(request: protos.google.firestore.v1beta1.IBatchWriteRequest, callback: Callback<protos.google.firestore.v1beta1.IBatchWriteResponse, protos.google.firestore.v1beta1.IBatchWriteRequest | null | undefined, {} | null | undefined>): void;
346
- /**
347
- * Creates a new document.
348
- *
349
- * @param {Object} request
350
- * The request object that will be sent.
351
- * @param {string} request.parent
352
- * Required. The parent resource. For example:
353
- * `projects/{project_id}/databases/{database_id}/documents` or
354
- * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
355
- * @param {string} request.collectionId
356
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
357
- * @param {string} request.documentId
358
- * The client-assigned document ID to use for this document.
359
- *
360
- * Optional. If not specified, an ID will be assigned by the service.
361
- * @param {google.firestore.v1beta1.Document} request.document
362
- * Required. The document to create. `name` must not be set.
363
- * @param {google.firestore.v1beta1.DocumentMask} request.mask
364
- * The fields to return. If not set, returns all fields.
365
- *
366
- * If the document has a field that is not present in this mask, that field
367
- * will not be returned in the response.
368
- * @param {object} [options]
369
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
370
- * @returns {Promise} - The promise which resolves to an array.
371
- * The first element of the array is an object representing {@link protos.google.firestore.v1beta1.Document|Document}.
372
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
373
- * for more details and examples.
374
- * @example <caption>include:samples/generated/v1beta1/firestore.create_document.js</caption>
375
- * region_tag:firestore_v1beta1_generated_Firestore_CreateDocument_async
376
- */
377
- createDocument(request?: protos.google.firestore.v1beta1.ICreateDocumentRequest, options?: CallOptions): Promise<[
378
- protos.google.firestore.v1beta1.IDocument,
379
- protos.google.firestore.v1beta1.ICreateDocumentRequest | undefined,
380
- {} | undefined
381
- ]>;
382
- createDocument(request: protos.google.firestore.v1beta1.ICreateDocumentRequest, options: CallOptions, callback: Callback<protos.google.firestore.v1beta1.IDocument, protos.google.firestore.v1beta1.ICreateDocumentRequest | null | undefined, {} | null | undefined>): void;
383
- createDocument(request: protos.google.firestore.v1beta1.ICreateDocumentRequest, callback: Callback<protos.google.firestore.v1beta1.IDocument, protos.google.firestore.v1beta1.ICreateDocumentRequest | null | undefined, {} | null | undefined>): void;
384
- /**
385
- * Gets multiple documents.
386
- *
387
- * Documents returned by this method are not guaranteed to be returned in the
388
- * same order that they were requested.
389
- *
390
- * @param {Object} request
391
- * The request object that will be sent.
392
- * @param {string} request.database
393
- * Required. The database name. In the format:
394
- * `projects/{project_id}/databases/{database_id}`.
395
- * @param {string[]} request.documents
396
- * The names of the documents to retrieve. In the format:
397
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
398
- * The request will fail if any of the document is not a child resource of the
399
- * given `database`. Duplicate names will be elided.
400
- * @param {google.firestore.v1beta1.DocumentMask} request.mask
401
- * The fields to return. If not set, returns all fields.
402
- *
403
- * If a document has a field that is not present in this mask, that field will
404
- * not be returned in the response.
405
- * @param {Buffer} request.transaction
406
- * Reads documents in a transaction.
407
- * @param {google.firestore.v1beta1.TransactionOptions} request.newTransaction
408
- * Starts a new transaction and reads the documents.
409
- * Defaults to a read-only transaction.
410
- * The new transaction ID will be returned as the first response in the
411
- * stream.
412
- * @param {google.protobuf.Timestamp} request.readTime
413
- * Reads documents as they were at the given time.
414
- * This may not be older than 270 seconds.
415
- * @param {object} [options]
416
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
417
- * @returns {Stream}
418
- * An object stream which emits {@link protos.google.firestore.v1beta1.BatchGetDocumentsResponse|BatchGetDocumentsResponse} on 'data' event.
419
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation }
420
- * for more details and examples.
421
- * @example <caption>include:samples/generated/v1beta1/firestore.batch_get_documents.js</caption>
422
- * region_tag:firestore_v1beta1_generated_Firestore_BatchGetDocuments_async
423
- */
424
- batchGetDocuments(request?: protos.google.firestore.v1beta1.IBatchGetDocumentsRequest, options?: CallOptions): gax.CancellableStream;
425
- /**
426
- * Runs a query.
427
- *
428
- * @param {Object} request
429
- * The request object that will be sent.
430
- * @param {string} request.parent
431
- * Required. The parent resource name. In the format:
432
- * `projects/{project_id}/databases/{database_id}/documents` or
433
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
434
- * For example:
435
- * `projects/my-project/databases/my-database/documents` or
436
- * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
437
- * @param {google.firestore.v1beta1.StructuredQuery} request.structuredQuery
438
- * A structured query.
439
- * @param {Buffer} request.transaction
440
- * Reads documents in a transaction.
441
- * @param {google.firestore.v1beta1.TransactionOptions} request.newTransaction
442
- * Starts a new transaction and reads the documents.
443
- * Defaults to a read-only transaction.
444
- * The new transaction ID will be returned as the first response in the
445
- * stream.
446
- * @param {google.protobuf.Timestamp} request.readTime
447
- * Reads documents as they were at the given time.
448
- * This may not be older than 270 seconds.
449
- * @param {object} [options]
450
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
451
- * @returns {Stream}
452
- * An object stream which emits {@link protos.google.firestore.v1beta1.RunQueryResponse|RunQueryResponse} on 'data' event.
453
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation }
454
- * for more details and examples.
455
- * @example <caption>include:samples/generated/v1beta1/firestore.run_query.js</caption>
456
- * region_tag:firestore_v1beta1_generated_Firestore_RunQuery_async
457
- */
458
- runQuery(request?: protos.google.firestore.v1beta1.IRunQueryRequest, options?: CallOptions): gax.CancellableStream;
459
- /**
460
- * Streams batches of document updates and deletes, in order.
461
- *
462
- * @param {object} [options]
463
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
464
- * @returns {Stream}
465
- * An object stream which is both readable and writable. It accepts objects
466
- * representing {@link protos.google.firestore.v1beta1.WriteRequest|WriteRequest} for write() method, and
467
- * will emit objects representing {@link protos.google.firestore.v1beta1.WriteResponse|WriteResponse} on 'data' event asynchronously.
468
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming | documentation }
469
- * for more details and examples.
470
- * @example <caption>include:samples/generated/v1beta1/firestore.write.js</caption>
471
- * region_tag:firestore_v1beta1_generated_Firestore_Write_async
472
- */
473
- write(options?: CallOptions): gax.CancellableStream;
474
- /**
475
- * Listens to changes.
476
- *
477
- * @param {object} [options]
478
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
479
- * @returns {Stream}
480
- * An object stream which is both readable and writable. It accepts objects
481
- * representing {@link protos.google.firestore.v1beta1.ListenRequest|ListenRequest} for write() method, and
482
- * will emit objects representing {@link protos.google.firestore.v1beta1.ListenResponse|ListenResponse} on 'data' event asynchronously.
483
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming | documentation }
484
- * for more details and examples.
485
- * @example <caption>include:samples/generated/v1beta1/firestore.listen.js</caption>
486
- * region_tag:firestore_v1beta1_generated_Firestore_Listen_async
487
- */
488
- listen(options?: CallOptions): gax.CancellableStream;
489
- /**
490
- * Lists documents.
491
- *
492
- * @param {Object} request
493
- * The request object that will be sent.
494
- * @param {string} request.parent
495
- * Required. The parent resource name. In the format:
496
- * `projects/{project_id}/databases/{database_id}/documents` or
497
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
498
- * For example:
499
- * `projects/my-project/databases/my-database/documents` or
500
- * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
501
- * @param {string} request.collectionId
502
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`
503
- * or `messages`.
504
- * @param {number} request.pageSize
505
- * The maximum number of documents to return.
506
- * @param {string} request.pageToken
507
- * The `next_page_token` value returned from a previous List request, if any.
508
- * @param {string} request.orderBy
509
- * The order to sort results by. For example: `priority desc, name`.
510
- * @param {google.firestore.v1beta1.DocumentMask} request.mask
511
- * The fields to return. If not set, returns all fields.
512
- *
513
- * If a document has a field that is not present in this mask, that field
514
- * will not be returned in the response.
515
- * @param {Buffer} request.transaction
516
- * Reads documents in a transaction.
517
- * @param {google.protobuf.Timestamp} request.readTime
518
- * Reads documents as they were at the given time.
519
- * This may not be older than 270 seconds.
520
- * @param {boolean} request.showMissing
521
- * If the list should show missing documents. A missing document is a
522
- * document that does not exist but has sub-documents. These documents will
523
- * be returned with a key but will not have fields, {@link protos.google.firestore.v1beta1.Document.create_time|Document.create_time},
524
- * or {@link protos.google.firestore.v1beta1.Document.update_time|Document.update_time} set.
525
- *
526
- * Requests with `show_missing` may not specify `where` or
527
- * `order_by`.
528
- * @param {object} [options]
529
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
530
- * @returns {Promise} - The promise which resolves to an array.
531
- * The first element of the array is Array of {@link protos.google.firestore.v1beta1.Document|Document}.
532
- * The client library will perform auto-pagination by default: it will call the API as many
533
- * times as needed and will merge results from all the pages into this array.
534
- * Note that it can affect your quota.
535
- * We recommend using `listDocumentsAsync()`
536
- * method described below for async iteration which you can stop as needed.
537
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
538
- * for more details and examples.
539
- */
540
- listDocuments(request?: protos.google.firestore.v1beta1.IListDocumentsRequest, options?: CallOptions): Promise<[
541
- protos.google.firestore.v1beta1.IDocument[],
542
- protos.google.firestore.v1beta1.IListDocumentsRequest | null,
543
- protos.google.firestore.v1beta1.IListDocumentsResponse
544
- ]>;
545
- listDocuments(request: protos.google.firestore.v1beta1.IListDocumentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.firestore.v1beta1.IListDocumentsRequest, protos.google.firestore.v1beta1.IListDocumentsResponse | null | undefined, protos.google.firestore.v1beta1.IDocument>): void;
546
- listDocuments(request: protos.google.firestore.v1beta1.IListDocumentsRequest, callback: PaginationCallback<protos.google.firestore.v1beta1.IListDocumentsRequest, protos.google.firestore.v1beta1.IListDocumentsResponse | null | undefined, protos.google.firestore.v1beta1.IDocument>): void;
547
- /**
548
- * Equivalent to `listDocuments`, but returns a NodeJS Stream object.
549
- * @param {Object} request
550
- * The request object that will be sent.
551
- * @param {string} request.parent
552
- * Required. The parent resource name. In the format:
553
- * `projects/{project_id}/databases/{database_id}/documents` or
554
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
555
- * For example:
556
- * `projects/my-project/databases/my-database/documents` or
557
- * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
558
- * @param {string} request.collectionId
559
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`
560
- * or `messages`.
561
- * @param {number} request.pageSize
562
- * The maximum number of documents to return.
563
- * @param {string} request.pageToken
564
- * The `next_page_token` value returned from a previous List request, if any.
565
- * @param {string} request.orderBy
566
- * The order to sort results by. For example: `priority desc, name`.
567
- * @param {google.firestore.v1beta1.DocumentMask} request.mask
568
- * The fields to return. If not set, returns all fields.
569
- *
570
- * If a document has a field that is not present in this mask, that field
571
- * will not be returned in the response.
572
- * @param {Buffer} request.transaction
573
- * Reads documents in a transaction.
574
- * @param {google.protobuf.Timestamp} request.readTime
575
- * Reads documents as they were at the given time.
576
- * This may not be older than 270 seconds.
577
- * @param {boolean} request.showMissing
578
- * If the list should show missing documents. A missing document is a
579
- * document that does not exist but has sub-documents. These documents will
580
- * be returned with a key but will not have fields, {@link protos.google.firestore.v1beta1.Document.create_time|Document.create_time},
581
- * or {@link protos.google.firestore.v1beta1.Document.update_time|Document.update_time} set.
582
- *
583
- * Requests with `show_missing` may not specify `where` or
584
- * `order_by`.
585
- * @param {object} [options]
586
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
587
- * @returns {Stream}
588
- * An object stream which emits an object representing {@link protos.google.firestore.v1beta1.Document|Document} on 'data' event.
589
- * The client library will perform auto-pagination by default: it will call the API as many
590
- * times as needed. Note that it can affect your quota.
591
- * We recommend using `listDocumentsAsync()`
592
- * method described below for async iteration which you can stop as needed.
593
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
594
- * for more details and examples.
595
- */
596
- listDocumentsStream(request?: protos.google.firestore.v1beta1.IListDocumentsRequest, options?: CallOptions): Transform;
597
- /**
598
- * Equivalent to `listDocuments`, but returns an iterable object.
599
- *
600
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
601
- * @param {Object} request
602
- * The request object that will be sent.
603
- * @param {string} request.parent
604
- * Required. The parent resource name. In the format:
605
- * `projects/{project_id}/databases/{database_id}/documents` or
606
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
607
- * For example:
608
- * `projects/my-project/databases/my-database/documents` or
609
- * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
610
- * @param {string} request.collectionId
611
- * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`
612
- * or `messages`.
613
- * @param {number} request.pageSize
614
- * The maximum number of documents to return.
615
- * @param {string} request.pageToken
616
- * The `next_page_token` value returned from a previous List request, if any.
617
- * @param {string} request.orderBy
618
- * The order to sort results by. For example: `priority desc, name`.
619
- * @param {google.firestore.v1beta1.DocumentMask} request.mask
620
- * The fields to return. If not set, returns all fields.
621
- *
622
- * If a document has a field that is not present in this mask, that field
623
- * will not be returned in the response.
624
- * @param {Buffer} request.transaction
625
- * Reads documents in a transaction.
626
- * @param {google.protobuf.Timestamp} request.readTime
627
- * Reads documents as they were at the given time.
628
- * This may not be older than 270 seconds.
629
- * @param {boolean} request.showMissing
630
- * If the list should show missing documents. A missing document is a
631
- * document that does not exist but has sub-documents. These documents will
632
- * be returned with a key but will not have fields, {@link protos.google.firestore.v1beta1.Document.create_time|Document.create_time},
633
- * or {@link protos.google.firestore.v1beta1.Document.update_time|Document.update_time} set.
634
- *
635
- * Requests with `show_missing` may not specify `where` or
636
- * `order_by`.
637
- * @param {object} [options]
638
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
639
- * @returns {Object}
640
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
641
- * When you iterate the returned iterable, each element will be an object representing
642
- * {@link protos.google.firestore.v1beta1.Document|Document}. The API will be called under the hood as needed, once per the page,
643
- * so you can stop the iteration when you don't need more results.
644
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
645
- * for more details and examples.
646
- * @example <caption>include:samples/generated/v1beta1/firestore.list_documents.js</caption>
647
- * region_tag:firestore_v1beta1_generated_Firestore_ListDocuments_async
648
- */
649
- listDocumentsAsync(request?: protos.google.firestore.v1beta1.IListDocumentsRequest, options?: CallOptions): AsyncIterable<protos.google.firestore.v1beta1.IDocument>;
650
- /**
651
- * Partitions a query by returning partition cursors that can be used to run
652
- * the query in parallel. The returned partition cursors are split points that
653
- * can be used by RunQuery as starting/end points for the query results.
654
- *
655
- * @param {Object} request
656
- * The request object that will be sent.
657
- * @param {string} request.parent
658
- * Required. The parent resource name. In the format:
659
- * `projects/{project_id}/databases/{database_id}/documents`.
660
- * Document resource names are not supported; only database resource names
661
- * can be specified.
662
- * @param {google.firestore.v1beta1.StructuredQuery} request.structuredQuery
663
- * A structured query.
664
- * Query must specify collection with all descendants and be ordered by name
665
- * ascending. Other filters, order bys, limits, offsets, and start/end
666
- * cursors are not supported.
667
- * @param {number} request.partitionCount
668
- * The desired maximum number of partition points.
669
- * The partitions may be returned across multiple pages of results.
670
- * The number must be positive. The actual number of partitions
671
- * returned may be fewer.
672
- *
673
- * For example, this may be set to one fewer than the number of parallel
674
- * queries to be run, or in running a data pipeline job, one fewer than the
675
- * number of workers or compute instances available.
676
- * @param {string} request.pageToken
677
- * The `next_page_token` value returned from a previous call to
678
- * PartitionQuery that may be used to get an additional set of results.
679
- * There are no ordering guarantees between sets of results. Thus, using
680
- * multiple sets of results will require merging the different result sets.
681
- *
682
- * For example, two subsequent calls using a page_token may return:
683
- *
684
- * * cursor B, cursor M, cursor Q
685
- * * cursor A, cursor U, cursor W
686
- *
687
- * To obtain a complete result set ordered with respect to the results of the
688
- * query supplied to PartitionQuery, the results sets should be merged:
689
- * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
690
- * @param {number} request.pageSize
691
- * The maximum number of partitions to return in this call, subject to
692
- * `partition_count`.
693
- *
694
- * For example, if `partition_count` = 10 and `page_size` = 8, the first call
695
- * to PartitionQuery will return up to 8 partitions and a `next_page_token`
696
- * if more results exist. A second call to PartitionQuery will return up to
697
- * 2 partitions, to complete the total of 10 specified in `partition_count`.
698
- * @param {object} [options]
699
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
700
- * @returns {Promise} - The promise which resolves to an array.
701
- * The first element of the array is Array of {@link protos.google.firestore.v1beta1.Cursor|Cursor}.
702
- * The client library will perform auto-pagination by default: it will call the API as many
703
- * times as needed and will merge results from all the pages into this array.
704
- * Note that it can affect your quota.
705
- * We recommend using `partitionQueryAsync()`
706
- * method described below for async iteration which you can stop as needed.
707
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
708
- * for more details and examples.
709
- */
710
- partitionQuery(request?: protos.google.firestore.v1beta1.IPartitionQueryRequest, options?: CallOptions): Promise<[
711
- protos.google.firestore.v1beta1.ICursor[],
712
- protos.google.firestore.v1beta1.IPartitionQueryRequest | null,
713
- protos.google.firestore.v1beta1.IPartitionQueryResponse
714
- ]>;
715
- partitionQuery(request: protos.google.firestore.v1beta1.IPartitionQueryRequest, options: CallOptions, callback: PaginationCallback<protos.google.firestore.v1beta1.IPartitionQueryRequest, protos.google.firestore.v1beta1.IPartitionQueryResponse | null | undefined, protos.google.firestore.v1beta1.ICursor>): void;
716
- partitionQuery(request: protos.google.firestore.v1beta1.IPartitionQueryRequest, callback: PaginationCallback<protos.google.firestore.v1beta1.IPartitionQueryRequest, protos.google.firestore.v1beta1.IPartitionQueryResponse | null | undefined, protos.google.firestore.v1beta1.ICursor>): void;
717
- /**
718
- * Equivalent to `partitionQuery`, but returns a NodeJS Stream object.
719
- * @param {Object} request
720
- * The request object that will be sent.
721
- * @param {string} request.parent
722
- * Required. The parent resource name. In the format:
723
- * `projects/{project_id}/databases/{database_id}/documents`.
724
- * Document resource names are not supported; only database resource names
725
- * can be specified.
726
- * @param {google.firestore.v1beta1.StructuredQuery} request.structuredQuery
727
- * A structured query.
728
- * Query must specify collection with all descendants and be ordered by name
729
- * ascending. Other filters, order bys, limits, offsets, and start/end
730
- * cursors are not supported.
731
- * @param {number} request.partitionCount
732
- * The desired maximum number of partition points.
733
- * The partitions may be returned across multiple pages of results.
734
- * The number must be positive. The actual number of partitions
735
- * returned may be fewer.
736
- *
737
- * For example, this may be set to one fewer than the number of parallel
738
- * queries to be run, or in running a data pipeline job, one fewer than the
739
- * number of workers or compute instances available.
740
- * @param {string} request.pageToken
741
- * The `next_page_token` value returned from a previous call to
742
- * PartitionQuery that may be used to get an additional set of results.
743
- * There are no ordering guarantees between sets of results. Thus, using
744
- * multiple sets of results will require merging the different result sets.
745
- *
746
- * For example, two subsequent calls using a page_token may return:
747
- *
748
- * * cursor B, cursor M, cursor Q
749
- * * cursor A, cursor U, cursor W
750
- *
751
- * To obtain a complete result set ordered with respect to the results of the
752
- * query supplied to PartitionQuery, the results sets should be merged:
753
- * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
754
- * @param {number} request.pageSize
755
- * The maximum number of partitions to return in this call, subject to
756
- * `partition_count`.
757
- *
758
- * For example, if `partition_count` = 10 and `page_size` = 8, the first call
759
- * to PartitionQuery will return up to 8 partitions and a `next_page_token`
760
- * if more results exist. A second call to PartitionQuery will return up to
761
- * 2 partitions, to complete the total of 10 specified in `partition_count`.
762
- * @param {object} [options]
763
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
764
- * @returns {Stream}
765
- * An object stream which emits an object representing {@link protos.google.firestore.v1beta1.Cursor|Cursor} on 'data' event.
766
- * The client library will perform auto-pagination by default: it will call the API as many
767
- * times as needed. Note that it can affect your quota.
768
- * We recommend using `partitionQueryAsync()`
769
- * method described below for async iteration which you can stop as needed.
770
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
771
- * for more details and examples.
772
- */
773
- partitionQueryStream(request?: protos.google.firestore.v1beta1.IPartitionQueryRequest, options?: CallOptions): Transform;
774
- /**
775
- * Equivalent to `partitionQuery`, but returns an iterable object.
776
- *
777
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
778
- * @param {Object} request
779
- * The request object that will be sent.
780
- * @param {string} request.parent
781
- * Required. The parent resource name. In the format:
782
- * `projects/{project_id}/databases/{database_id}/documents`.
783
- * Document resource names are not supported; only database resource names
784
- * can be specified.
785
- * @param {google.firestore.v1beta1.StructuredQuery} request.structuredQuery
786
- * A structured query.
787
- * Query must specify collection with all descendants and be ordered by name
788
- * ascending. Other filters, order bys, limits, offsets, and start/end
789
- * cursors are not supported.
790
- * @param {number} request.partitionCount
791
- * The desired maximum number of partition points.
792
- * The partitions may be returned across multiple pages of results.
793
- * The number must be positive. The actual number of partitions
794
- * returned may be fewer.
795
- *
796
- * For example, this may be set to one fewer than the number of parallel
797
- * queries to be run, or in running a data pipeline job, one fewer than the
798
- * number of workers or compute instances available.
799
- * @param {string} request.pageToken
800
- * The `next_page_token` value returned from a previous call to
801
- * PartitionQuery that may be used to get an additional set of results.
802
- * There are no ordering guarantees between sets of results. Thus, using
803
- * multiple sets of results will require merging the different result sets.
804
- *
805
- * For example, two subsequent calls using a page_token may return:
806
- *
807
- * * cursor B, cursor M, cursor Q
808
- * * cursor A, cursor U, cursor W
809
- *
810
- * To obtain a complete result set ordered with respect to the results of the
811
- * query supplied to PartitionQuery, the results sets should be merged:
812
- * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
813
- * @param {number} request.pageSize
814
- * The maximum number of partitions to return in this call, subject to
815
- * `partition_count`.
816
- *
817
- * For example, if `partition_count` = 10 and `page_size` = 8, the first call
818
- * to PartitionQuery will return up to 8 partitions and a `next_page_token`
819
- * if more results exist. A second call to PartitionQuery will return up to
820
- * 2 partitions, to complete the total of 10 specified in `partition_count`.
821
- * @param {object} [options]
822
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
823
- * @returns {Object}
824
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
825
- * When you iterate the returned iterable, each element will be an object representing
826
- * {@link protos.google.firestore.v1beta1.Cursor|Cursor}. The API will be called under the hood as needed, once per the page,
827
- * so you can stop the iteration when you don't need more results.
828
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
829
- * for more details and examples.
830
- * @example <caption>include:samples/generated/v1beta1/firestore.partition_query.js</caption>
831
- * region_tag:firestore_v1beta1_generated_Firestore_PartitionQuery_async
832
- */
833
- partitionQueryAsync(request?: protos.google.firestore.v1beta1.IPartitionQueryRequest, options?: CallOptions): AsyncIterable<protos.google.firestore.v1beta1.ICursor>;
834
- /**
835
- * Lists all the collection IDs underneath a document.
836
- *
837
- * @param {Object} request
838
- * The request object that will be sent.
839
- * @param {string} request.parent
840
- * Required. The parent document. In the format:
841
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
842
- * For example:
843
- * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
844
- * @param {number} request.pageSize
845
- * The maximum number of results to return.
846
- * @param {string} request.pageToken
847
- * A page token. Must be a value from
848
- * {@link protos.google.firestore.v1beta1.ListCollectionIdsResponse|ListCollectionIdsResponse}.
849
- * @param {object} [options]
850
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
851
- * @returns {Promise} - The promise which resolves to an array.
852
- * The first element of the array is Array of string.
853
- * The client library will perform auto-pagination by default: it will call the API as many
854
- * times as needed and will merge results from all the pages into this array.
855
- * Note that it can affect your quota.
856
- * We recommend using `listCollectionIdsAsync()`
857
- * method described below for async iteration which you can stop as needed.
858
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
859
- * for more details and examples.
860
- */
861
- listCollectionIds(request?: protos.google.firestore.v1beta1.IListCollectionIdsRequest, options?: CallOptions): Promise<[
862
- string[],
863
- protos.google.firestore.v1beta1.IListCollectionIdsRequest | null,
864
- protos.google.firestore.v1beta1.IListCollectionIdsResponse
865
- ]>;
866
- listCollectionIds(request: protos.google.firestore.v1beta1.IListCollectionIdsRequest, options: CallOptions, callback: PaginationCallback<protos.google.firestore.v1beta1.IListCollectionIdsRequest, protos.google.firestore.v1beta1.IListCollectionIdsResponse | null | undefined, string>): void;
867
- listCollectionIds(request: protos.google.firestore.v1beta1.IListCollectionIdsRequest, callback: PaginationCallback<protos.google.firestore.v1beta1.IListCollectionIdsRequest, protos.google.firestore.v1beta1.IListCollectionIdsResponse | null | undefined, string>): void;
868
- /**
869
- * Equivalent to `listCollectionIds`, but returns a NodeJS Stream object.
870
- * @param {Object} request
871
- * The request object that will be sent.
872
- * @param {string} request.parent
873
- * Required. The parent document. In the format:
874
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
875
- * For example:
876
- * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
877
- * @param {number} request.pageSize
878
- * The maximum number of results to return.
879
- * @param {string} request.pageToken
880
- * A page token. Must be a value from
881
- * {@link protos.google.firestore.v1beta1.ListCollectionIdsResponse|ListCollectionIdsResponse}.
882
- * @param {object} [options]
883
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
884
- * @returns {Stream}
885
- * An object stream which emits an object representing string on 'data' event.
886
- * The client library will perform auto-pagination by default: it will call the API as many
887
- * times as needed. Note that it can affect your quota.
888
- * We recommend using `listCollectionIdsAsync()`
889
- * method described below for async iteration which you can stop as needed.
890
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
891
- * for more details and examples.
892
- */
893
- listCollectionIdsStream(request?: protos.google.firestore.v1beta1.IListCollectionIdsRequest, options?: CallOptions): Transform;
894
- /**
895
- * Equivalent to `listCollectionIds`, but returns an iterable object.
896
- *
897
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
898
- * @param {Object} request
899
- * The request object that will be sent.
900
- * @param {string} request.parent
901
- * Required. The parent document. In the format:
902
- * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
903
- * For example:
904
- * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
905
- * @param {number} request.pageSize
906
- * The maximum number of results to return.
907
- * @param {string} request.pageToken
908
- * A page token. Must be a value from
909
- * {@link protos.google.firestore.v1beta1.ListCollectionIdsResponse|ListCollectionIdsResponse}.
910
- * @param {object} [options]
911
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
912
- * @returns {Object}
913
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
914
- * When you iterate the returned iterable, each element will be an object representing
915
- * string. The API will be called under the hood as needed, once per the page,
916
- * so you can stop the iteration when you don't need more results.
917
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
918
- * for more details and examples.
919
- * @example <caption>include:samples/generated/v1beta1/firestore.list_collection_ids.js</caption>
920
- * region_tag:firestore_v1beta1_generated_Firestore_ListCollectionIds_async
921
- */
922
- listCollectionIdsAsync(request?: protos.google.firestore.v1beta1.IListCollectionIdsRequest, options?: CallOptions): AsyncIterable<string>;
923
- /**
924
- * Terminate the gRPC channel and close the client.
925
- *
926
- * The client will no longer be usable and all future behavior is undefined.
927
- * @returns {Promise} A promise that resolves when the client is closed.
928
- */
929
- close(): Promise<void>;
930
- }