@google-cloud/firestore
Advanced tools
Comparing version 4.4.0 to 4.5.0
@@ -80,2 +80,5 @@ "use strict"; | ||
}, | ||
[Symbol.toPrimitive]: () => { | ||
throw new Error('For tests only. Not Implemented'); | ||
}, | ||
}; | ||
@@ -82,0 +85,0 @@ return timeout; |
@@ -32,3 +32,3 @@ /*! | ||
* | ||
* @class | ||
* @class BulkWriter | ||
*/ | ||
@@ -35,0 +35,0 @@ export declare class BulkWriter { |
@@ -218,3 +218,3 @@ "use strict"; | ||
* | ||
* @class | ||
* @class BulkWriter | ||
*/ | ||
@@ -221,0 +221,0 @@ class BulkWriter { |
@@ -23,3 +23,3 @@ /*! | ||
* | ||
* @class | ||
* @class DocumentChange | ||
*/ | ||
@@ -26,0 +26,0 @@ export declare class DocumentChange<T = firestore.DocumentData> implements firestore.DocumentChange { |
@@ -22,3 +22,3 @@ "use strict"; | ||
* | ||
* @class | ||
* @class DocumentChange | ||
*/ | ||
@@ -25,0 +25,0 @@ class DocumentChange { |
@@ -63,3 +63,3 @@ /*! | ||
* | ||
* @class | ||
* @class DocumentSnapshot | ||
*/ | ||
@@ -293,3 +293,3 @@ export declare class DocumentSnapshot<T = firestore.DocumentData> implements firestore.DocumentSnapshot<T> { | ||
* | ||
* @class | ||
* @class QueryDocumentSnapshot | ||
* @extends DocumentSnapshot | ||
@@ -296,0 +296,0 @@ */ |
@@ -65,3 +65,3 @@ "use strict"; | ||
* | ||
* @class | ||
* @class DocumentSnapshot | ||
*/ | ||
@@ -431,3 +431,3 @@ class DocumentSnapshot { | ||
* | ||
* @class | ||
* @class QueryDocumentSnapshot | ||
* @extends DocumentSnapshot | ||
@@ -434,0 +434,0 @@ */ |
@@ -25,3 +25,3 @@ /*! | ||
* | ||
* @class | ||
* @class FieldValue | ||
*/ | ||
@@ -28,0 +28,0 @@ export declare class FieldValue implements firestore.FieldValue { |
@@ -25,3 +25,3 @@ "use strict"; | ||
* | ||
* @class | ||
* @class FieldValue | ||
*/ | ||
@@ -28,0 +28,0 @@ class FieldValue { |
@@ -23,3 +23,3 @@ /*! | ||
import { DocumentSnapshot, QueryDocumentSnapshot } from './document'; | ||
import { CollectionReference, Query } from './reference'; | ||
import { CollectionReference } from './reference'; | ||
import { DocumentReference } from './reference'; | ||
@@ -31,2 +31,3 @@ import { Serializer } from './serializer'; | ||
import api = google.firestore.v1; | ||
import { CollectionGroup } from './collection-group'; | ||
export { CollectionReference, DocumentReference, QuerySnapshot, Query, } from './reference'; | ||
@@ -42,2 +43,4 @@ export { BulkWriter } from './bulk-writer'; | ||
export { GeoPoint } from './geo-point'; | ||
export { CollectionGroup }; | ||
export { QueryPartition } from './query-partition'; | ||
export { setLogFunction } from './logger'; | ||
@@ -341,3 +344,3 @@ export { Status as GrpcStatus } from 'google-gax'; | ||
* path will be included. Cannot contain a slash. | ||
* @returns {Query} The created Query. | ||
* @returns {CollectionGroup} The created CollectionGroup. | ||
* | ||
@@ -356,3 +359,3 @@ * @example | ||
*/ | ||
collectionGroup(collectionId: string): Query; | ||
collectionGroup(collectionId: string): CollectionGroup; | ||
/** | ||
@@ -359,0 +362,0 @@ * Creates a [WriteBatch]{@link WriteBatch}, used for performing |
@@ -39,2 +39,4 @@ "use strict"; | ||
const serviceConfig = firestore_client_config_json_1.interfaces['google.firestore.v1.Firestore']; | ||
const collection_group_1 = require("./collection-group"); | ||
exports.CollectionGroup = collection_group_1.CollectionGroup; | ||
var reference_3 = require("./reference"); | ||
@@ -65,2 +67,4 @@ exports.CollectionReference = reference_3.CollectionReference; | ||
exports.GeoPoint = geo_point_1.GeoPoint; | ||
var query_partition_1 = require("./query-partition"); | ||
exports.QueryPartition = query_partition_1.QueryPartition; | ||
var logger_2 = require("./logger"); | ||
@@ -528,3 +532,3 @@ exports.setLogFunction = logger_2.setLogFunction; | ||
* path will be included. Cannot contain a slash. | ||
* @returns {Query} The created Query. | ||
* @returns {CollectionGroup} The created CollectionGroup. | ||
* | ||
@@ -547,3 +551,3 @@ * @example | ||
} | ||
return new reference_1.Query(this, reference_1.QueryOptions.forCollectionGroupQuery(collectionId)); | ||
return new collection_group_1.CollectionGroup(this, collectionId, /* converter= */ undefined); | ||
} | ||
@@ -550,0 +554,0 @@ /** |
@@ -53,3 +53,3 @@ /*! | ||
* | ||
* @class | ||
* @class DocumentReference | ||
*/ | ||
@@ -353,3 +353,3 @@ export declare class DocumentReference<T = firestore.DocumentData> implements Serializable, firestore.DocumentReference<T> { | ||
*/ | ||
declare class FieldOrder { | ||
export declare class FieldOrder { | ||
readonly field: FieldPath; | ||
@@ -570,3 +570,3 @@ readonly direction: api.StructuredQuery.Direction; | ||
before: boolean; | ||
values: unknown[]; | ||
values: api.IValue[]; | ||
} | ||
@@ -627,3 +627,3 @@ /*! | ||
export declare class Query<T = firestore.DocumentData> implements firestore.Query<T> { | ||
private readonly _firestore; | ||
readonly _firestore: Firestore; | ||
protected readonly _queryOptions: QueryOptions<T>; | ||
@@ -640,11 +640,2 @@ private readonly _serializer; | ||
/** | ||
* Detects the argument type for Firestore cursors. | ||
* | ||
* @private | ||
* @param fieldValuesOrDocumentSnapshot A snapshot of the document or a set | ||
* of field values. | ||
* @returns 'true' if the input is a single DocumentSnapshot.. | ||
*/ | ||
static _isDocumentSnapshot(fieldValuesOrDocumentSnapshot: Array<DocumentSnapshot<unknown> | unknown>): boolean; | ||
/** | ||
* Extracts field values from the DocumentSnapshot based on the provided | ||
@@ -1002,2 +993,4 @@ * field order. | ||
* Converts current Query to an IBundledQuery. | ||
* | ||
* @private | ||
*/ | ||
@@ -1097,3 +1090,3 @@ _toBundledQuery(): protos.firestore.IBundledQuery; | ||
* | ||
* @class | ||
* @class CollectionReference | ||
* @extends Query | ||
@@ -1169,3 +1162,3 @@ */ | ||
* return collectionRef.listDocuments().then(documentRefs => { | ||
* return firestore.getAll(documentRefs); | ||
* return firestore.getAll(...documentRefs); | ||
* }).then(documentSnapshots => { | ||
@@ -1172,0 +1165,0 @@ * for (let documentSnapshot of documentSnapshots) { |
@@ -28,3 +28,3 @@ /*! | ||
* | ||
* @class | ||
* @class Transaction | ||
*/ | ||
@@ -31,0 +31,0 @@ export declare class Transaction implements firestore.Transaction { |
@@ -37,3 +37,3 @@ "use strict"; | ||
* | ||
* @class | ||
* @class Transaction | ||
*/ | ||
@@ -40,0 +40,0 @@ class Transaction { |
@@ -46,2 +46,3 @@ /*! | ||
listen(options?: CallOptions): Duplex; | ||
partitionQueryStream(request?: api.IPartitionQueryRequest, options?: CallOptions): Duplex; | ||
close(): Promise<void>; | ||
@@ -52,3 +53,3 @@ } | ||
/** Streaming methods used in the Firestore SDK. */ | ||
export declare type FirestoreStreamingMethod = 'listen' | 'runQuery' | 'batchGetDocuments'; | ||
export declare type FirestoreStreamingMethod = 'listen' | 'partitionQueryStream' | 'runQuery' | 'batchGetDocuments'; | ||
/** Type signature for the unary methods in the GAPIC layer. */ | ||
@@ -55,0 +56,0 @@ export declare type UnaryMethod<Req, Resp> = (request: Req, callOptions: CallOptions) => Promise<[Resp, unknown, unknown]>; |
@@ -81,3 +81,4 @@ { | ||
"PartitionQuery": { | ||
"retry_codes_name": "non_idempotent", | ||
"timeout_millis": 300000, | ||
"retry_codes_name": "deadline_exceeded_internal_unavailable", | ||
"retry_params_name": "default" | ||
@@ -84,0 +85,0 @@ }, |
@@ -26,3 +26,3 @@ /*! | ||
* | ||
* @class | ||
* @class WriteResult | ||
*/ | ||
@@ -67,6 +67,5 @@ export declare class WriteResult implements firestore.WriteResult { | ||
export declare class BatchWriteResult { | ||
readonly key: string; | ||
readonly writeTime: Timestamp | null; | ||
readonly status: GoogleError; | ||
constructor(key: string, writeTime: Timestamp | null, status: GoogleError); | ||
constructor(writeTime: Timestamp | null, status: GoogleError); | ||
} | ||
@@ -77,3 +76,3 @@ /** | ||
* | ||
* @class | ||
* @class WriteBatch | ||
*/ | ||
@@ -80,0 +79,0 @@ export declare class WriteBatch implements firestore.WriteBatch { |
@@ -31,3 +31,3 @@ "use strict"; | ||
* | ||
* @class | ||
* @class WriteResult | ||
*/ | ||
@@ -80,4 +80,3 @@ class WriteResult { | ||
class BatchWriteResult { | ||
constructor(key, writeTime, status) { | ||
this.key = key; | ||
constructor(writeTime, status) { | ||
this.writeTime = writeTime; | ||
@@ -92,3 +91,3 @@ this.status = status; | ||
* | ||
* @class | ||
* @class WriteBatch | ||
*/ | ||
@@ -112,3 +111,5 @@ class WriteBatch { | ||
// indexes to retry. | ||
this._ops = retryBatch._ops.filter((op, index) => indexesToRetry.has(index)); | ||
for (const index of indexesToRetry.values()) { | ||
this._ops.push(retryBatch._ops[index]); | ||
} | ||
} | ||
@@ -459,3 +460,3 @@ } | ||
: null; | ||
return new BatchWriteResult(this._ops[i].docPath, updateTime, error); | ||
return new BatchWriteResult(updateTime, error); | ||
}); | ||
@@ -462,0 +463,0 @@ } |
@@ -7,2 +7,20 @@ # Changelog | ||
## [4.5.0](https://www.github.com/googleapis/nodejs-firestore/compare/v4.4.0...v4.5.0) (2020-10-26) | ||
### Features | ||
* add implicit ordering for startAt(DocumentReference) calls ([#1328](https://www.github.com/googleapis/nodejs-firestore/issues/1328)) ([e9afa38](https://www.github.com/googleapis/nodejs-firestore/commit/e9afa38592b3cc324a8d4685244ee4b249eeedfc)) | ||
* add support for Partition API ([#1320](https://www.github.com/googleapis/nodejs-firestore/issues/1320)) ([51961c3](https://www.github.com/googleapis/nodejs-firestore/commit/51961c3b39ff9c532214eb783458f83da98eb485)) | ||
### Bug Fixes | ||
* retry PartitionQuery for INTERNAL and DEADLINE_EXCEEDED ([#1336](https://www.github.com/googleapis/nodejs-firestore/issues/1336)) ([fdf5462](https://www.github.com/googleapis/nodejs-firestore/commit/fdf5462917e322cc04bf47ebc337d5a76a4a8b18)) | ||
* simplify BulkWriter logic ([#1321](https://www.github.com/googleapis/nodejs-firestore/issues/1321)) ([b493baf](https://www.github.com/googleapis/nodejs-firestore/commit/b493baf44e729fa584b29881ef83f7821967a97b)) | ||
* speed up listDocuments pagination ([#1344](https://www.github.com/googleapis/nodejs-firestore/issues/1344)) ([498301d](https://www.github.com/googleapis/nodejs-firestore/commit/498301dc06bdd5a1eccaadd7ffb1b470749488f7)) | ||
* Update getAll example in documentation ([#1326](https://www.github.com/googleapis/nodejs-firestore/issues/1326)) ([721fce0](https://www.github.com/googleapis/nodejs-firestore/commit/721fce02440fde39e8a5c2d379b2254079e15201)) | ||
* update required field to implement NodeJS.Timeout ([#1338](https://www.github.com/googleapis/nodejs-firestore/issues/1338)) ([6b7371b](https://www.github.com/googleapis/nodejs-firestore/commit/6b7371b4511a7cf039f85519a9d4b8be1bff8930)) | ||
* **firestore/v1:** give PartitionQuery retry/timeout config ([#1334](https://www.github.com/googleapis/nodejs-firestore/issues/1334)) ([39a30c2](https://www.github.com/googleapis/nodejs-firestore/commit/39a30c24a54078e53ad9c746ee8ae5a4a9471349)) | ||
## [4.4.0](https://www.github.com/googleapis/nodejs-firestore/compare/v4.3.0...v4.4.0) (2020-09-29) | ||
@@ -9,0 +27,0 @@ |
{ | ||
"name": "@google-cloud/firestore", | ||
"description": "Firestore Client Library for Node.js", | ||
"version": "4.4.0", | ||
"version": "4.5.0", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4443322
109
82674