@firebase/firestore-types 2.5.1 → 3.0.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.
- package/index.d.ts +24 -8
- package/package.json +1 -1
- package/CHANGELOG.md +0 -80
package/index.d.ts
CHANGED
|
@@ -241,7 +241,10 @@ export interface GetOptions {
|
|
|
241
241
|
readonly source?: 'default' | 'server' | 'cache';
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
export class DocumentReference<
|
|
244
|
+
export class DocumentReference<
|
|
245
|
+
T = DocumentData,
|
|
246
|
+
T2 extends DocumentData = DocumentData
|
|
247
|
+
> {
|
|
245
248
|
private constructor();
|
|
246
249
|
|
|
247
250
|
readonly id: string;
|
|
@@ -307,7 +310,10 @@ export interface SnapshotMetadata {
|
|
|
307
310
|
isEqual(other: SnapshotMetadata): boolean;
|
|
308
311
|
}
|
|
309
312
|
|
|
310
|
-
export class DocumentSnapshot<
|
|
313
|
+
export class DocumentSnapshot<
|
|
314
|
+
T = DocumentData,
|
|
315
|
+
T2 extends DocumentData = DocumentData
|
|
316
|
+
> {
|
|
311
317
|
protected constructor();
|
|
312
318
|
|
|
313
319
|
readonly exists: boolean;
|
|
@@ -323,8 +329,9 @@ export class DocumentSnapshot<T = DocumentData> {
|
|
|
323
329
|
}
|
|
324
330
|
|
|
325
331
|
export class QueryDocumentSnapshot<
|
|
326
|
-
T = DocumentData
|
|
327
|
-
|
|
332
|
+
T = DocumentData,
|
|
333
|
+
T2 extends DocumentData = DocumentData
|
|
334
|
+
> extends DocumentSnapshot<T, T2> {
|
|
328
335
|
private constructor();
|
|
329
336
|
|
|
330
337
|
data(options?: SnapshotOptions): T;
|
|
@@ -344,7 +351,7 @@ export type WhereFilterOp =
|
|
|
344
351
|
| 'array-contains-any'
|
|
345
352
|
| 'not-in';
|
|
346
353
|
|
|
347
|
-
export class Query<T = DocumentData> {
|
|
354
|
+
export class Query<T = DocumentData, T2 extends DocumentData = DocumentData> {
|
|
348
355
|
protected constructor();
|
|
349
356
|
|
|
350
357
|
readonly firestore: FirebaseFirestore;
|
|
@@ -409,7 +416,10 @@ export class Query<T = DocumentData> {
|
|
|
409
416
|
withConverter<U>(converter: FirestoreDataConverter<U>): Query<U>;
|
|
410
417
|
}
|
|
411
418
|
|
|
412
|
-
export class QuerySnapshot<
|
|
419
|
+
export class QuerySnapshot<
|
|
420
|
+
T = DocumentData,
|
|
421
|
+
T2 extends DocumentData = DocumentData
|
|
422
|
+
> {
|
|
413
423
|
private constructor();
|
|
414
424
|
|
|
415
425
|
readonly query: Query<T>;
|
|
@@ -430,14 +440,20 @@ export class QuerySnapshot<T = DocumentData> {
|
|
|
430
440
|
|
|
431
441
|
export type DocumentChangeType = 'added' | 'removed' | 'modified';
|
|
432
442
|
|
|
433
|
-
export interface DocumentChange<
|
|
443
|
+
export interface DocumentChange<
|
|
444
|
+
T = DocumentData,
|
|
445
|
+
T2 extends DocumentData = DocumentData
|
|
446
|
+
> {
|
|
434
447
|
readonly type: DocumentChangeType;
|
|
435
448
|
readonly doc: QueryDocumentSnapshot<T>;
|
|
436
449
|
readonly oldIndex: number;
|
|
437
450
|
readonly newIndex: number;
|
|
438
451
|
}
|
|
439
452
|
|
|
440
|
-
export class CollectionReference<
|
|
453
|
+
export class CollectionReference<
|
|
454
|
+
T = DocumentData,
|
|
455
|
+
T2 extends DocumentData = DocumentData
|
|
456
|
+
> extends Query<T, T2> {
|
|
441
457
|
private constructor();
|
|
442
458
|
|
|
443
459
|
readonly id: string;
|
package/package.json
CHANGED
package/CHANGELOG.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# @firebase/firestore-types
|
|
2
|
-
|
|
3
|
-
## 2.5.1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- [`4af28c1a4`](https://github.com/firebase/firebase-js-sdk/commit/4af28c1a42bd25ce2353f694ca1724c6101cbce5) [#6682](https://github.com/firebase/firebase-js-sdk/pull/6682) - Upgrade TypeScript to 4.7.4.
|
|
8
|
-
|
|
9
|
-
## 2.5.0
|
|
10
|
-
|
|
11
|
-
### Minor Changes
|
|
12
|
-
|
|
13
|
-
- [`cdada6c68`](https://github.com/firebase/firebase-js-sdk/commit/cdada6c68f9740d13dd6674bcb658e28e68253b6) [#5345](https://github.com/firebase/firebase-js-sdk/pull/5345) (fixes [#5015](https://github.com/firebase/firebase-js-sdk/issues/5015)) - Release modularized SDKs
|
|
14
|
-
|
|
15
|
-
## 2.4.0
|
|
16
|
-
|
|
17
|
-
### Minor Changes
|
|
18
|
-
|
|
19
|
-
- [`3c6a11c8d`](https://github.com/firebase/firebase-js-sdk/commit/3c6a11c8d0b35afddb50e9c3e0c4d2e30f642131) [#5282](https://github.com/firebase/firebase-js-sdk/pull/5282) - Implement mockUserToken for Storage and fix JWT format bugs.
|
|
20
|
-
|
|
21
|
-
## 2.3.0
|
|
22
|
-
|
|
23
|
-
### Minor Changes
|
|
24
|
-
|
|
25
|
-
- [`97f61e6f3`](https://github.com/firebase/firebase-js-sdk/commit/97f61e6f3d24e5b4c92ed248bb531233a94b9eaf) [#4837](https://github.com/firebase/firebase-js-sdk/pull/4837) (fixes [#4715](https://github.com/firebase/firebase-js-sdk/issues/4715)) - Add mockUserToken support for Firestore.
|
|
26
|
-
|
|
27
|
-
## 2.2.0
|
|
28
|
-
|
|
29
|
-
### Minor Changes
|
|
30
|
-
|
|
31
|
-
- [`b6080a857`](https://github.com/firebase/firebase-js-sdk/commit/b6080a857b1b56e10db041e6357acd69154e31fb) [#4577](https://github.com/firebase/firebase-js-sdk/pull/4577) - Added support to remove a FirestoreDataConverter on a Firestore reference by calling `withConverter(null)`
|
|
32
|
-
|
|
33
|
-
## 2.1.0
|
|
34
|
-
|
|
35
|
-
### Minor Changes
|
|
36
|
-
|
|
37
|
-
- [`b662f8c0a`](https://github.com/firebase/firebase-js-sdk/commit/b662f8c0a9890cbdcf53cce7fe01c2a8a52d3d2d) [#4168](https://github.com/firebase/firebase-js-sdk/pull/4168) - Release Firestore Bundles (pre-packaged Firestore data). For NPM users, this can
|
|
38
|
-
be enabled via an additional import: 'firebase/firestore/bundle'. For CDN usage,
|
|
39
|
-
it is enabled by default.
|
|
40
|
-
|
|
41
|
-
## 2.0.0
|
|
42
|
-
|
|
43
|
-
### Major Changes
|
|
44
|
-
|
|
45
|
-
- [`ffef32e38`](https://github.com/firebase/firebase-js-sdk/commit/ffef32e3837d3ee1098129b237e7a6e2e738182d) [#3897](https://github.com/firebase/firebase-js-sdk/pull/3897) (fixes [#3879](https://github.com/firebase/firebase-js-sdk/issues/3879)) - Removed the `timestampsInSnapshots` option from `FirestoreSettings`. Now, Firestore always returns `Timestamp` values for all timestamp values.
|
|
46
|
-
|
|
47
|
-
### Minor Changes
|
|
48
|
-
|
|
49
|
-
- [`79b049375`](https://github.com/firebase/firebase-js-sdk/commit/79b04937537b90422e051086112f6b43c2880cdb) [#3909](https://github.com/firebase/firebase-js-sdk/pull/3909) - Add a useEmulator(host, port) method to Firestore
|
|
50
|
-
|
|
51
|
-
## 1.14.0
|
|
52
|
-
|
|
53
|
-
### Minor Changes
|
|
54
|
-
|
|
55
|
-
- [`4f997bce1`](https://github.com/firebase/firebase-js-sdk/commit/4f997bce102be272b76836b6bcba96ea7de857bc) [#3724](https://github.com/firebase/firebase-js-sdk/pull/3724) - Adds a new `experimentalAutoDetectLongPolling` to FirestoreSettings. When
|
|
56
|
-
enabled, the SDK's underlying transport (WebChannel) automatically detects if
|
|
57
|
-
long-polling should be used. This is very similar to
|
|
58
|
-
`experimentalForceLongPolling`, but only uses long-polling if required.
|
|
59
|
-
|
|
60
|
-
## 1.13.0
|
|
61
|
-
|
|
62
|
-
### Minor Changes
|
|
63
|
-
|
|
64
|
-
- [`f9004177e`](https://github.com/firebase/firebase-js-sdk/commit/f9004177e76f00fc484d30c0c0e7b1bc2da033f9) [#3772](https://github.com/firebase/firebase-js-sdk/pull/3772) - [feature] Added `not-in` and `!=` query operators for use with `.where()`. `not-in` finds documents where a specified field’s value is not in a specified array. `!=` finds documents where a specified field's value does not equal the specified value. Neither query operator will match documents where the specified field is not present.
|
|
65
|
-
|
|
66
|
-
* [`a8ff3dbaa`](https://github.com/firebase/firebase-js-sdk/commit/a8ff3dbaacd06371e6652a6d639ef2d9bead612b) [#3418](https://github.com/firebase/firebase-js-sdk/pull/3418) - Use FirestoreError instead of Error in onSnapshot\*() error callbacks.
|
|
67
|
-
|
|
68
|
-
## 1.12.1
|
|
69
|
-
|
|
70
|
-
### Patch Changes
|
|
71
|
-
|
|
72
|
-
- [`61b4cd31b`](https://github.com/firebase/firebase-js-sdk/commit/61b4cd31b961c90354be38b18af5fbea9da8d5a3) [#3464](https://github.com/firebase/firebase-js-sdk/pull/3464) (fixes [#3354](https://github.com/firebase/firebase-js-sdk/issues/3354)) - feat: Added `merge` option to `firestore.settings()`, which merges the provided settings with
|
|
73
|
-
settings from a previous call. This allows adding settings on top of the settings that were applied
|
|
74
|
-
by `@firebase/testing`.
|
|
75
|
-
|
|
76
|
-
## 1.12.0
|
|
77
|
-
|
|
78
|
-
### Minor Changes
|
|
79
|
-
|
|
80
|
-
- [`39ca8ecf`](https://github.com/firebase/firebase-js-sdk/commit/39ca8ecf940472159d0bc58212f34a70146da60c) [#3254](https://github.com/firebase/firebase-js-sdk/pull/3254) Thanks [@thebrianchen](https://github.com/thebrianchen)! - Added support for `set()` with merge options when using `FirestoreDataConverter`.
|