@firebase/firestore 3.9.0-20230301000120 → 3.9.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/CHANGELOG.md +14 -5
- package/dist/firestore/src/lite-api/query.d.ts +11 -19
- package/dist/firestore/src/lite-api/reference.d.ts +1 -1
- package/dist/firestore/src/util/debug_uid.d.ts +28 -0
- package/dist/firestore/test/unit/specs/spec_builder.d.ts +3 -0
- package/dist/firestore/test/unit/specs/spec_test_components.d.ts +5 -1
- package/dist/index.cjs.js +1359 -1309
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +66 -14
- package/dist/index.esm2017.js +1272 -1222
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +1335 -1259
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +97 -32
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +97 -32
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +1380 -1330
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +12 -20
- package/dist/lite/firestore/src/lite-api/query.d.ts +11 -19
- package/dist/lite/firestore/src/lite-api/reference.d.ts +1 -1
- package/dist/lite/firestore/src/util/debug_uid.d.ts +28 -0
- package/dist/lite/firestore/test/unit/specs/spec_builder.d.ts +3 -0
- package/dist/lite/firestore/test/unit/specs/spec_test_components.d.ts +5 -1
- package/dist/lite/index.browser.esm2017.js +775 -730
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +736 -693
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.cjs.js +775 -730
- package/dist/lite/index.cjs.js.map +1 -1
- package/dist/lite/index.d.ts +66 -14
- package/dist/lite/index.node.cjs.js +76 -18
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +76 -18
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +777 -732
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +12 -20
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +139 -142
- package/dist/lite/packages/firestore/src/lite-api/query.d.ts +11 -19
- package/dist/lite/packages/firestore/src/lite-api/reference.d.ts +1 -1
- package/dist/lite/packages/firestore/src/util/debug_uid.d.ts +28 -0
- package/dist/lite/packages/firestore/test/unit/specs/spec_builder.d.ts +3 -0
- package/dist/lite/packages/firestore/test/unit/specs/spec_test_components.d.ts +5 -1
- package/dist/lite/private.d.ts +72 -16
- package/dist/packages/firestore/dist/index.esm2017.d.ts +157 -160
- package/dist/packages/firestore/src/lite-api/query.d.ts +11 -19
- package/dist/packages/firestore/src/lite-api/reference.d.ts +1 -1
- package/dist/packages/firestore/src/util/debug_uid.d.ts +28 -0
- package/dist/packages/firestore/test/unit/specs/spec_builder.d.ts +3 -0
- package/dist/packages/firestore/test/unit/specs/spec_test_components.d.ts +5 -1
- package/dist/private.d.ts +72 -16
- package/package.json +7 -7
package/dist/internal.d.ts
CHANGED
|
@@ -161,7 +161,6 @@ export declare type AggregateType = 'count' | 'avg' | 'sum';
|
|
|
161
161
|
* {@link QueryFilterConstraint}s to perform a conjunction for. These must be
|
|
162
162
|
* created with calls to {@link where}, {@link or}, or {@link and}.
|
|
163
163
|
* @returns The newly created {@link QueryCompositeFilterConstraint}.
|
|
164
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
165
164
|
*/
|
|
166
165
|
export declare function and(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
167
166
|
|
|
@@ -626,7 +625,7 @@ export declare function collectionGroup(firestore: Firestore_2, collectionId: st
|
|
|
626
625
|
|
|
627
626
|
/**
|
|
628
627
|
* A `CollectionReference` object can be used for adding documents, getting
|
|
629
|
-
* document references, and querying for documents (using {@link query}).
|
|
628
|
+
* document references, and querying for documents (using {@link (query:1)}).
|
|
630
629
|
*/
|
|
631
630
|
export declare class CollectionReference<T = DocumentData> extends Query<T> {
|
|
632
631
|
readonly _path: _ResourcePath;
|
|
@@ -4076,7 +4075,6 @@ declare const enum Operator {
|
|
|
4076
4075
|
* {@link QueryFilterConstraint}s to perform a disjunction for. These must be
|
|
4077
4076
|
* created with calls to {@link where}, {@link or}, or {@link and}.
|
|
4078
4077
|
* @returns The newly created {@link QueryCompositeFilterConstraint}.
|
|
4079
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
4080
4078
|
*/
|
|
4081
4079
|
export declare function or(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
4082
4080
|
|
|
@@ -4512,7 +4510,6 @@ export declare class Query<T = DocumentData> {
|
|
|
4512
4510
|
* apply (e.g. {@link orderBy}, {@link limit}).
|
|
4513
4511
|
* @throws if any of the provided query constraints cannot be combined with the
|
|
4514
4512
|
* existing or new constraints.
|
|
4515
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
4516
4513
|
*/
|
|
4517
4514
|
export declare function query<T>(query: Query<T>, compositeFilter: QueryCompositeFilterConstraint, ...queryConstraints: QueryNonFilterConstraint[]): Query<T>;
|
|
4518
4515
|
|
|
@@ -4550,9 +4547,8 @@ declare interface Query_2 {
|
|
|
4550
4547
|
* returned by a Firestore query by performing the logical OR or AND of multiple
|
|
4551
4548
|
* {@link QueryFieldFilterConstraint}s or {@link QueryCompositeFilterConstraint}s.
|
|
4552
4549
|
* `QueryCompositeFilterConstraint`s are created by invoking {@link or} or
|
|
4553
|
-
* {@link and} and can then be passed to {@link query} to create a new query
|
|
4550
|
+
* {@link and} and can then be passed to {@link (query:1)} to create a new query
|
|
4554
4551
|
* instance that also contains the `QueryCompositeFilterConstraint`.
|
|
4555
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
4556
4552
|
*/
|
|
4557
4553
|
export declare class QueryCompositeFilterConstraint extends AppliableConstraint {
|
|
4558
4554
|
/** The type of this query constraint */
|
|
@@ -4574,9 +4570,9 @@ export declare class QueryCompositeFilterConstraint extends AppliableConstraint
|
|
|
4574
4570
|
/**
|
|
4575
4571
|
* A `QueryConstraint` is used to narrow the set of documents returned by a
|
|
4576
4572
|
* Firestore query. `QueryConstraint`s are created by invoking {@link where},
|
|
4577
|
-
* {@link orderBy}, {@link startAt}, {@link startAfter}, {@link
|
|
4578
|
-
* endBefore}, {@link endAt}, {@link limit}, {@link limitToLast} and
|
|
4579
|
-
* can then be passed to {@link query} to create a new query instance that
|
|
4573
|
+
* {@link orderBy}, {@link (startAt:1)}, {@link (startAfter:1)}, {@link
|
|
4574
|
+
* (endBefore:1)}, {@link (endAt:1)}, {@link limit}, {@link limitToLast} and
|
|
4575
|
+
* can then be passed to {@link (query:1)} to create a new query instance that
|
|
4580
4576
|
* also contains this `QueryConstraint`.
|
|
4581
4577
|
*/
|
|
4582
4578
|
export declare abstract class QueryConstraint extends AppliableConstraint {
|
|
@@ -4645,7 +4641,7 @@ declare class QueryDocumentSnapshot_2<T = DocumentData> extends DocumentSnapshot
|
|
|
4645
4641
|
* A `QueryEndAtConstraint` is used to exclude documents from the end of a
|
|
4646
4642
|
* result set returned by a Firestore query.
|
|
4647
4643
|
* `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or
|
|
4648
|
-
* {@link (endBefore:1)} and can then be passed to {@link query} to create a new
|
|
4644
|
+
* {@link (endBefore:1)} and can then be passed to {@link (query:1)} to create a new
|
|
4649
4645
|
* query instance that also contains this `QueryEndAtConstraint`.
|
|
4650
4646
|
*/
|
|
4651
4647
|
export declare class QueryEndAtConstraint extends QueryConstraint {
|
|
@@ -4678,7 +4674,7 @@ export declare function queryEqual<T>(left: Query<T>, right: Query<T>): boolean;
|
|
|
4678
4674
|
* A `QueryFieldFilterConstraint` is used to narrow the set of documents returned by
|
|
4679
4675
|
* a Firestore query by filtering on one or more document fields.
|
|
4680
4676
|
* `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then
|
|
4681
|
-
* be passed to {@link query} to create a new query instance that also contains
|
|
4677
|
+
* be passed to {@link (query:1)} to create a new query instance that also contains
|
|
4682
4678
|
* this `QueryFieldFilterConstraint`.
|
|
4683
4679
|
*/
|
|
4684
4680
|
export declare class QueryFieldFilterConstraint extends QueryConstraint {
|
|
@@ -4699,10 +4695,6 @@ export declare class QueryFieldFilterConstraint extends QueryConstraint {
|
|
|
4699
4695
|
/**
|
|
4700
4696
|
* `QueryFilterConstraint` is a helper union type that represents
|
|
4701
4697
|
* {@link QueryFieldFilterConstraint} and {@link QueryCompositeFilterConstraint}.
|
|
4702
|
-
* `QueryFilterConstraint`s are created by invoking {@link or} or {@link and}
|
|
4703
|
-
* and can then be passed to {@link query} to create a new query instance that
|
|
4704
|
-
* also contains the `QueryConstraint`.
|
|
4705
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
4706
4698
|
*/
|
|
4707
4699
|
export declare type QueryFilterConstraint = QueryFieldFilterConstraint | QueryCompositeFilterConstraint;
|
|
4708
4700
|
|
|
@@ -4710,7 +4702,7 @@ export declare type QueryFilterConstraint = QueryFieldFilterConstraint | QueryCo
|
|
|
4710
4702
|
* A `QueryLimitConstraint` is used to limit the number of documents returned by
|
|
4711
4703
|
* a Firestore query.
|
|
4712
4704
|
* `QueryLimitConstraint`s are created by invoking {@link limit} or
|
|
4713
|
-
* {@link limitToLast} and can then be passed to {@link query} to create a new
|
|
4705
|
+
* {@link limitToLast} and can then be passed to {@link (query:1)} to create a new
|
|
4714
4706
|
* query instance that also contains this `QueryLimitConstraint`.
|
|
4715
4707
|
*/
|
|
4716
4708
|
export declare class QueryLimitConstraint extends QueryConstraint {
|
|
@@ -4733,8 +4725,8 @@ export declare class QueryLimitConstraint extends QueryConstraint {
|
|
|
4733
4725
|
* QueryConstraints which are used to narrow or order the set of documents,
|
|
4734
4726
|
* but that do not explicitly filter on a document field.
|
|
4735
4727
|
* `QueryNonFilterConstraint`s are created by invoking {@link orderBy},
|
|
4736
|
-
* {@link startAt}, {@link startAfter}, {@link endBefore}, {@link endAt},
|
|
4737
|
-
* {@link limit} or {@link limitToLast} and can then be passed to {@link query}
|
|
4728
|
+
* {@link (startAt:1)}, {@link (startAfter:1)}, {@link (endBefore:1)}, {@link (endAt:1)},
|
|
4729
|
+
* {@link limit} or {@link limitToLast} and can then be passed to {@link (query:1)}
|
|
4738
4730
|
* to create a new query instance that also contains the `QueryConstraint`.
|
|
4739
4731
|
*/
|
|
4740
4732
|
export declare type QueryNonFilterConstraint = QueryOrderByConstraint | QueryLimitConstraint | QueryStartAtConstraint | QueryEndAtConstraint;
|
|
@@ -4742,7 +4734,7 @@ export declare type QueryNonFilterConstraint = QueryOrderByConstraint | QueryLim
|
|
|
4742
4734
|
/**
|
|
4743
4735
|
* A `QueryOrderByConstraint` is used to sort the set of documents returned by a
|
|
4744
4736
|
* Firestore query. `QueryOrderByConstraint`s are created by invoking
|
|
4745
|
-
* {@link orderBy} and can then be passed to {@link query} to create a new query
|
|
4737
|
+
* {@link orderBy} and can then be passed to {@link (query:1)} to create a new query
|
|
4746
4738
|
* instance that also contains this `QueryOrderByConstraint`.
|
|
4747
4739
|
*
|
|
4748
4740
|
* Note: Documents that do not contain the orderBy field will not be present in
|
|
@@ -4816,7 +4808,7 @@ export declare class QuerySnapshot<T = DocumentData> {
|
|
|
4816
4808
|
* A `QueryStartAtConstraint` is used to exclude documents from the start of a
|
|
4817
4809
|
* result set returned by a Firestore query.
|
|
4818
4810
|
* `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or
|
|
4819
|
-
* {@link (startAfter:1)} and can then be passed to {@link query} to create a
|
|
4811
|
+
* {@link (startAfter:1)} and can then be passed to {@link (query:1)} to create a
|
|
4820
4812
|
* new query instance that also contains this `QueryStartAtConstraint`.
|
|
4821
4813
|
*/
|
|
4822
4814
|
export declare class QueryStartAtConstraint extends QueryConstraint {
|
|
@@ -42,9 +42,9 @@ export declare abstract class AppliableConstraint {
|
|
|
42
42
|
/**
|
|
43
43
|
* A `QueryConstraint` is used to narrow the set of documents returned by a
|
|
44
44
|
* Firestore query. `QueryConstraint`s are created by invoking {@link where},
|
|
45
|
-
* {@link orderBy}, {@link startAt}, {@link startAfter}, {@link
|
|
46
|
-
* endBefore}, {@link endAt}, {@link limit}, {@link limitToLast} and
|
|
47
|
-
* can then be passed to {@link query} to create a new query instance that
|
|
45
|
+
* {@link orderBy}, {@link (startAt:1)}, {@link (startAfter:1)}, {@link
|
|
46
|
+
* (endBefore:1)}, {@link (endAt:1)}, {@link limit}, {@link limitToLast} and
|
|
47
|
+
* can then be passed to {@link (query:1)} to create a new query instance that
|
|
48
48
|
* also contains this `QueryConstraint`.
|
|
49
49
|
*/
|
|
50
50
|
export declare abstract class QueryConstraint extends AppliableConstraint {
|
|
@@ -69,7 +69,6 @@ export declare abstract class QueryConstraint extends AppliableConstraint {
|
|
|
69
69
|
* apply (e.g. {@link orderBy}, {@link limit}).
|
|
70
70
|
* @throws if any of the provided query constraints cannot be combined with the
|
|
71
71
|
* existing or new constraints.
|
|
72
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
73
72
|
*/
|
|
74
73
|
export declare function query<T>(query: Query<T>, compositeFilter: QueryCompositeFilterConstraint, ...queryConstraints: QueryNonFilterConstraint[]): Query<T>;
|
|
75
74
|
/**
|
|
@@ -87,7 +86,7 @@ export declare function query<T>(query: Query<T>, ...queryConstraints: QueryCons
|
|
|
87
86
|
* A `QueryFieldFilterConstraint` is used to narrow the set of documents returned by
|
|
88
87
|
* a Firestore query by filtering on one or more document fields.
|
|
89
88
|
* `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then
|
|
90
|
-
* be passed to {@link query} to create a new query instance that also contains
|
|
89
|
+
* be passed to {@link (query:1)} to create a new query instance that also contains
|
|
91
90
|
* this `QueryFieldFilterConstraint`.
|
|
92
91
|
*/
|
|
93
92
|
export declare class QueryFieldFilterConstraint extends QueryConstraint {
|
|
@@ -127,9 +126,8 @@ export declare function where(fieldPath: string | FieldPath, opStr: WhereFilterO
|
|
|
127
126
|
* returned by a Firestore query by performing the logical OR or AND of multiple
|
|
128
127
|
* {@link QueryFieldFilterConstraint}s or {@link QueryCompositeFilterConstraint}s.
|
|
129
128
|
* `QueryCompositeFilterConstraint`s are created by invoking {@link or} or
|
|
130
|
-
* {@link and} and can then be passed to {@link query} to create a new query
|
|
129
|
+
* {@link and} and can then be passed to {@link (query:1)} to create a new query
|
|
131
130
|
* instance that also contains the `QueryCompositeFilterConstraint`.
|
|
132
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
133
131
|
*/
|
|
134
132
|
export declare class QueryCompositeFilterConstraint extends AppliableConstraint {
|
|
135
133
|
/** The type of this query constraint */
|
|
@@ -152,18 +150,14 @@ export declare class QueryCompositeFilterConstraint extends AppliableConstraint
|
|
|
152
150
|
* QueryConstraints which are used to narrow or order the set of documents,
|
|
153
151
|
* but that do not explicitly filter on a document field.
|
|
154
152
|
* `QueryNonFilterConstraint`s are created by invoking {@link orderBy},
|
|
155
|
-
* {@link startAt}, {@link startAfter}, {@link endBefore}, {@link endAt},
|
|
156
|
-
* {@link limit} or {@link limitToLast} and can then be passed to {@link query}
|
|
153
|
+
* {@link (startAt:1)}, {@link (startAfter:1)}, {@link (endBefore:1)}, {@link (endAt:1)},
|
|
154
|
+
* {@link limit} or {@link limitToLast} and can then be passed to {@link (query:1)}
|
|
157
155
|
* to create a new query instance that also contains the `QueryConstraint`.
|
|
158
156
|
*/
|
|
159
157
|
export declare type QueryNonFilterConstraint = QueryOrderByConstraint | QueryLimitConstraint | QueryStartAtConstraint | QueryEndAtConstraint;
|
|
160
158
|
/**
|
|
161
159
|
* `QueryFilterConstraint` is a helper union type that represents
|
|
162
160
|
* {@link QueryFieldFilterConstraint} and {@link QueryCompositeFilterConstraint}.
|
|
163
|
-
* `QueryFilterConstraint`s are created by invoking {@link or} or {@link and}
|
|
164
|
-
* and can then be passed to {@link query} to create a new query instance that
|
|
165
|
-
* also contains the `QueryConstraint`.
|
|
166
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
167
161
|
*/
|
|
168
162
|
export declare type QueryFilterConstraint = QueryFieldFilterConstraint | QueryCompositeFilterConstraint;
|
|
169
163
|
/**
|
|
@@ -175,7 +169,6 @@ export declare type QueryFilterConstraint = QueryFieldFilterConstraint | QueryCo
|
|
|
175
169
|
* {@link QueryFilterConstraint}s to perform a disjunction for. These must be
|
|
176
170
|
* created with calls to {@link where}, {@link or}, or {@link and}.
|
|
177
171
|
* @returns The newly created {@link QueryCompositeFilterConstraint}.
|
|
178
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
179
172
|
*/
|
|
180
173
|
export declare function or(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
181
174
|
/**
|
|
@@ -187,13 +180,12 @@ export declare function or(...queryConstraints: QueryFilterConstraint[]): QueryC
|
|
|
187
180
|
* {@link QueryFilterConstraint}s to perform a conjunction for. These must be
|
|
188
181
|
* created with calls to {@link where}, {@link or}, or {@link and}.
|
|
189
182
|
* @returns The newly created {@link QueryCompositeFilterConstraint}.
|
|
190
|
-
* @internal TODO remove this internal tag with OR Query support in the server
|
|
191
183
|
*/
|
|
192
184
|
export declare function and(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
193
185
|
/**
|
|
194
186
|
* A `QueryOrderByConstraint` is used to sort the set of documents returned by a
|
|
195
187
|
* Firestore query. `QueryOrderByConstraint`s are created by invoking
|
|
196
|
-
* {@link orderBy} and can then be passed to {@link query} to create a new query
|
|
188
|
+
* {@link orderBy} and can then be passed to {@link (query:1)} to create a new query
|
|
197
189
|
* instance that also contains this `QueryOrderByConstraint`.
|
|
198
190
|
*
|
|
199
191
|
* Note: Documents that do not contain the orderBy field will not be present in
|
|
@@ -233,7 +225,7 @@ export declare function orderBy(fieldPath: string | FieldPath, directionStr?: Or
|
|
|
233
225
|
* A `QueryLimitConstraint` is used to limit the number of documents returned by
|
|
234
226
|
* a Firestore query.
|
|
235
227
|
* `QueryLimitConstraint`s are created by invoking {@link limit} or
|
|
236
|
-
* {@link limitToLast} and can then be passed to {@link query} to create a new
|
|
228
|
+
* {@link limitToLast} and can then be passed to {@link (query:1)} to create a new
|
|
237
229
|
* query instance that also contains this `QueryLimitConstraint`.
|
|
238
230
|
*/
|
|
239
231
|
export declare class QueryLimitConstraint extends QueryConstraint {
|
|
@@ -273,7 +265,7 @@ export declare function limitToLast(limit: number): QueryLimitConstraint;
|
|
|
273
265
|
* A `QueryStartAtConstraint` is used to exclude documents from the start of a
|
|
274
266
|
* result set returned by a Firestore query.
|
|
275
267
|
* `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or
|
|
276
|
-
* {@link (startAfter:1)} and can then be passed to {@link query} to create a
|
|
268
|
+
* {@link (startAfter:1)} and can then be passed to {@link (query:1)} to create a
|
|
277
269
|
* new query instance that also contains this `QueryStartAtConstraint`.
|
|
278
270
|
*/
|
|
279
271
|
export declare class QueryStartAtConstraint extends QueryConstraint {
|
|
@@ -334,7 +326,7 @@ export declare function startAfter(...fieldValues: unknown[]): QueryStartAtConst
|
|
|
334
326
|
* A `QueryEndAtConstraint` is used to exclude documents from the end of a
|
|
335
327
|
* result set returned by a Firestore query.
|
|
336
328
|
* `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or
|
|
337
|
-
* {@link (endBefore:1)} and can then be passed to {@link query} to create a new
|
|
329
|
+
* {@link (endBefore:1)} and can then be passed to {@link (query:1)} to create a new
|
|
338
330
|
* query instance that also contains this `QueryEndAtConstraint`.
|
|
339
331
|
*/
|
|
340
332
|
export declare class QueryEndAtConstraint extends QueryConstraint {
|
|
@@ -173,7 +173,7 @@ export declare class Query<T = DocumentData> {
|
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* A `CollectionReference` object can be used for adding documents, getting
|
|
176
|
-
* document references, and querying for documents (using {@link query}).
|
|
176
|
+
* document references, and querying for documents (using {@link (query:1)}).
|
|
177
177
|
*/
|
|
178
178
|
export declare class CollectionReference<T = DocumentData> extends Query<T> {
|
|
179
179
|
readonly _path: ResourcePath;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Generates and returns a unique ID as a hexadecimal string.
|
|
19
|
+
*
|
|
20
|
+
* The returned ID is intended to be used in debug logging messages to help
|
|
21
|
+
* correlate log messages that may be spatially separated in the logs, but
|
|
22
|
+
* logically related. For example, a network connection could include the same
|
|
23
|
+
* "debug ID" string in all of its log messages to help trace a specific
|
|
24
|
+
* connection over time.
|
|
25
|
+
*
|
|
26
|
+
* @return the 10-character generated ID (e.g. "0xa1b2c3d4").
|
|
27
|
+
*/
|
|
28
|
+
export declare function generateUniqueDebugId(): string;
|
|
@@ -19,6 +19,7 @@ import { Query } from '../../../src/core/query';
|
|
|
19
19
|
import { Target } from '../../../src/core/target';
|
|
20
20
|
import { TargetIdGenerator } from '../../../src/core/target_id_generator';
|
|
21
21
|
import { TargetId } from '../../../src/core/types';
|
|
22
|
+
import { TargetPurpose } from '../../../src/local/target_data';
|
|
22
23
|
import { Document } from '../../../src/model/document';
|
|
23
24
|
import { DocumentKey } from '../../../src/model/document_key';
|
|
24
25
|
import { FieldIndex } from '../../../src/model/field_index';
|
|
@@ -34,6 +35,7 @@ export interface LimboMap {
|
|
|
34
35
|
}
|
|
35
36
|
export interface ActiveTargetSpec {
|
|
36
37
|
queries: SpecQuery[];
|
|
38
|
+
targetPurpose?: TargetPurpose;
|
|
37
39
|
resumeToken?: string;
|
|
38
40
|
readTime?: TestSnapshotVersion;
|
|
39
41
|
}
|
|
@@ -139,6 +141,7 @@ export declare class SpecBuilder {
|
|
|
139
141
|
/** Overrides the currently expected set of active targets. */
|
|
140
142
|
expectActiveTargets(...targets: Array<{
|
|
141
143
|
query: Query;
|
|
144
|
+
targetPurpose?: TargetPurpose;
|
|
142
145
|
resumeToken?: string;
|
|
143
146
|
readTime?: TestSnapshotVersion;
|
|
144
147
|
}>): this;
|
|
@@ -28,6 +28,7 @@ import { PersistenceTransaction, PersistenceTransactionMode } from '../../../src
|
|
|
28
28
|
import { SharedClientState } from '../../../src/local/shared_client_state';
|
|
29
29
|
import { Mutation } from '../../../src/model/mutation';
|
|
30
30
|
import * as api from '../../../src/protos/firestore_proto_api';
|
|
31
|
+
import { ApiClientObjectMap } from '../../../src/protos/firestore_proto_api';
|
|
31
32
|
import { Connection, Stream } from '../../../src/remote/connection';
|
|
32
33
|
import { Datastore } from '../../../src/remote/datastore';
|
|
33
34
|
import { StreamBridge } from '../../../src/remote/stream_bridge';
|
|
@@ -102,7 +103,10 @@ export declare class MockConnection implements Connection {
|
|
|
102
103
|
* stream, as a mapping from target ID to query Target.
|
|
103
104
|
*/
|
|
104
105
|
activeTargets: {
|
|
105
|
-
[targetId: number]:
|
|
106
|
+
[targetId: number]: {
|
|
107
|
+
target: api.Target;
|
|
108
|
+
labels?: ApiClientObjectMap<string>;
|
|
109
|
+
};
|
|
106
110
|
};
|
|
107
111
|
/** A Deferred that is resolved once watch opens. */
|
|
108
112
|
watchOpen: Deferred<void>;
|