@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
|
@@ -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>;
|
package/dist/private.d.ts
CHANGED
|
@@ -118,7 +118,17 @@ export declare type AggregateSpecData<T extends AggregateSpec> = {
|
|
|
118
118
|
|
|
119
119
|
/* Excluded from this release type: AggregateType */
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
/**
|
|
122
|
+
* Creates a new {@link QueryCompositeFilterConstraint} that is a conjunction of
|
|
123
|
+
* the given filter constraints. A conjunction filter includes a document if it
|
|
124
|
+
* satisfies all of the given filters.
|
|
125
|
+
*
|
|
126
|
+
* @param queryConstraints - Optional. The list of
|
|
127
|
+
* {@link QueryFilterConstraint}s to perform a conjunction for. These must be
|
|
128
|
+
* created with calls to {@link where}, {@link or}, or {@link and}.
|
|
129
|
+
* @returns The newly created {@link QueryCompositeFilterConstraint}.
|
|
130
|
+
*/
|
|
131
|
+
export declare function and(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
122
132
|
|
|
123
133
|
declare interface ApiClientObjectMap<T> {
|
|
124
134
|
[k: string]: T;
|
|
@@ -528,7 +538,7 @@ export declare function collectionGroup(firestore: Firestore_2, collectionId: st
|
|
|
528
538
|
|
|
529
539
|
/**
|
|
530
540
|
* A `CollectionReference` object can be used for adding documents, getting
|
|
531
|
-
* document references, and querying for documents (using {@link query}).
|
|
541
|
+
* document references, and querying for documents (using {@link (query:1)}).
|
|
532
542
|
*/
|
|
533
543
|
export declare class CollectionReference<T = DocumentData> extends Query<T> {
|
|
534
544
|
readonly _path: _ResourcePath;
|
|
@@ -3799,7 +3809,17 @@ declare const enum Operator {
|
|
|
3799
3809
|
ARRAY_CONTAINS_ANY = "array-contains-any"
|
|
3800
3810
|
}
|
|
3801
3811
|
|
|
3802
|
-
|
|
3812
|
+
/**
|
|
3813
|
+
* Creates a new {@link QueryCompositeFilterConstraint} that is a disjunction of
|
|
3814
|
+
* the given filter constraints. A disjunction filter includes a document if it
|
|
3815
|
+
* satisfies any of the given filters.
|
|
3816
|
+
*
|
|
3817
|
+
* @param queryConstraints - Optional. The list of
|
|
3818
|
+
* {@link QueryFilterConstraint}s to perform a disjunction for. These must be
|
|
3819
|
+
* created with calls to {@link where}, {@link or}, or {@link and}.
|
|
3820
|
+
* @returns The newly created {@link QueryCompositeFilterConstraint}.
|
|
3821
|
+
*/
|
|
3822
|
+
export declare function or(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
3803
3823
|
|
|
3804
3824
|
/**
|
|
3805
3825
|
* An ordering on a field, in some Direction. Direction defaults to ASCENDING.
|
|
@@ -4220,7 +4240,21 @@ export declare class Query<T = DocumentData> {
|
|
|
4220
4240
|
withConverter<U>(converter: FirestoreDataConverter_2<U>): Query<U>;
|
|
4221
4241
|
}
|
|
4222
4242
|
|
|
4223
|
-
|
|
4243
|
+
/**
|
|
4244
|
+
* Creates a new immutable instance of {@link Query} that is extended to also
|
|
4245
|
+
* include additional query constraints.
|
|
4246
|
+
*
|
|
4247
|
+
* @param query - The {@link Query} instance to use as a base for the new
|
|
4248
|
+
* constraints.
|
|
4249
|
+
* @param compositeFilter - The {@link QueryCompositeFilterConstraint} to
|
|
4250
|
+
* apply. Create {@link QueryCompositeFilterConstraint} using {@link and} or
|
|
4251
|
+
* {@link or}.
|
|
4252
|
+
* @param queryConstraints - Additional {@link QueryNonFilterConstraint}s to
|
|
4253
|
+
* apply (e.g. {@link orderBy}, {@link limit}).
|
|
4254
|
+
* @throws if any of the provided query constraints cannot be combined with the
|
|
4255
|
+
* existing or new constraints.
|
|
4256
|
+
*/
|
|
4257
|
+
export declare function query<T>(query: Query<T>, compositeFilter: QueryCompositeFilterConstraint, ...queryConstraints: QueryNonFilterConstraint[]): Query<T>;
|
|
4224
4258
|
|
|
4225
4259
|
/**
|
|
4226
4260
|
* Creates a new immutable instance of {@link Query} that is extended to also
|
|
@@ -4251,14 +4285,32 @@ declare interface Query_2 {
|
|
|
4251
4285
|
readonly endAt: Bound | null;
|
|
4252
4286
|
}
|
|
4253
4287
|
|
|
4254
|
-
|
|
4288
|
+
/**
|
|
4289
|
+
* A `QueryCompositeFilterConstraint` is used to narrow the set of documents
|
|
4290
|
+
* returned by a Firestore query by performing the logical OR or AND of multiple
|
|
4291
|
+
* {@link QueryFieldFilterConstraint}s or {@link QueryCompositeFilterConstraint}s.
|
|
4292
|
+
* `QueryCompositeFilterConstraint`s are created by invoking {@link or} or
|
|
4293
|
+
* {@link and} and can then be passed to {@link (query:1)} to create a new query
|
|
4294
|
+
* instance that also contains the `QueryCompositeFilterConstraint`.
|
|
4295
|
+
*/
|
|
4296
|
+
export declare class QueryCompositeFilterConstraint extends AppliableConstraint {
|
|
4297
|
+
/** The type of this query constraint */
|
|
4298
|
+
readonly type: 'or' | 'and';
|
|
4299
|
+
private readonly _queryConstraints;
|
|
4300
|
+
/* Excluded from this release type: __constructor */
|
|
4301
|
+
static _create(type: 'or' | 'and', _queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
4302
|
+
_parse<T>(query: Query<T>): Filter;
|
|
4303
|
+
_apply<T>(query: Query<T>): Query<T>;
|
|
4304
|
+
_getQueryConstraints(): readonly AppliableConstraint[];
|
|
4305
|
+
_getOperator(): CompositeOperator;
|
|
4306
|
+
}
|
|
4255
4307
|
|
|
4256
4308
|
/**
|
|
4257
4309
|
* A `QueryConstraint` is used to narrow the set of documents returned by a
|
|
4258
4310
|
* Firestore query. `QueryConstraint`s are created by invoking {@link where},
|
|
4259
|
-
* {@link orderBy}, {@link startAt}, {@link startAfter}, {@link
|
|
4260
|
-
* endBefore}, {@link endAt}, {@link limit}, {@link limitToLast} and
|
|
4261
|
-
* can then be passed to {@link query} to create a new query instance that
|
|
4311
|
+
* {@link orderBy}, {@link (startAt:1)}, {@link (startAfter:1)}, {@link
|
|
4312
|
+
* (endBefore:1)}, {@link (endAt:1)}, {@link limit}, {@link limitToLast} and
|
|
4313
|
+
* can then be passed to {@link (query:1)} to create a new query instance that
|
|
4262
4314
|
* also contains this `QueryConstraint`.
|
|
4263
4315
|
*/
|
|
4264
4316
|
export declare abstract class QueryConstraint extends AppliableConstraint {
|
|
@@ -4327,7 +4379,7 @@ declare class QueryDocumentSnapshot_2<T = DocumentData> extends DocumentSnapshot
|
|
|
4327
4379
|
* A `QueryEndAtConstraint` is used to exclude documents from the end of a
|
|
4328
4380
|
* result set returned by a Firestore query.
|
|
4329
4381
|
* `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or
|
|
4330
|
-
* {@link (endBefore:1)} and can then be passed to {@link query} to create a new
|
|
4382
|
+
* {@link (endBefore:1)} and can then be passed to {@link (query:1)} to create a new
|
|
4331
4383
|
* query instance that also contains this `QueryEndAtConstraint`.
|
|
4332
4384
|
*/
|
|
4333
4385
|
export declare class QueryEndAtConstraint extends QueryConstraint {
|
|
@@ -4355,7 +4407,7 @@ export declare function queryEqual<T>(left: Query<T>, right: Query<T>): boolean;
|
|
|
4355
4407
|
* A `QueryFieldFilterConstraint` is used to narrow the set of documents returned by
|
|
4356
4408
|
* a Firestore query by filtering on one or more document fields.
|
|
4357
4409
|
* `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then
|
|
4358
|
-
* be passed to {@link query} to create a new query instance that also contains
|
|
4410
|
+
* be passed to {@link (query:1)} to create a new query instance that also contains
|
|
4359
4411
|
* this `QueryFieldFilterConstraint`.
|
|
4360
4412
|
*/
|
|
4361
4413
|
export declare class QueryFieldFilterConstraint extends QueryConstraint {
|
|
@@ -4370,13 +4422,17 @@ export declare class QueryFieldFilterConstraint extends QueryConstraint {
|
|
|
4370
4422
|
_parse<T>(query: Query<T>): FieldFilter;
|
|
4371
4423
|
}
|
|
4372
4424
|
|
|
4373
|
-
|
|
4425
|
+
/**
|
|
4426
|
+
* `QueryFilterConstraint` is a helper union type that represents
|
|
4427
|
+
* {@link QueryFieldFilterConstraint} and {@link QueryCompositeFilterConstraint}.
|
|
4428
|
+
*/
|
|
4429
|
+
export declare type QueryFilterConstraint = QueryFieldFilterConstraint | QueryCompositeFilterConstraint;
|
|
4374
4430
|
|
|
4375
4431
|
/**
|
|
4376
4432
|
* A `QueryLimitConstraint` is used to limit the number of documents returned by
|
|
4377
4433
|
* a Firestore query.
|
|
4378
4434
|
* `QueryLimitConstraint`s are created by invoking {@link limit} or
|
|
4379
|
-
* {@link limitToLast} and can then be passed to {@link query} to create a new
|
|
4435
|
+
* {@link limitToLast} and can then be passed to {@link (query:1)} to create a new
|
|
4380
4436
|
* query instance that also contains this `QueryLimitConstraint`.
|
|
4381
4437
|
*/
|
|
4382
4438
|
export declare class QueryLimitConstraint extends QueryConstraint {
|
|
@@ -4394,8 +4450,8 @@ export declare class QueryLimitConstraint extends QueryConstraint {
|
|
|
4394
4450
|
* QueryConstraints which are used to narrow or order the set of documents,
|
|
4395
4451
|
* but that do not explicitly filter on a document field.
|
|
4396
4452
|
* `QueryNonFilterConstraint`s are created by invoking {@link orderBy},
|
|
4397
|
-
* {@link startAt}, {@link startAfter}, {@link endBefore}, {@link endAt},
|
|
4398
|
-
* {@link limit} or {@link limitToLast} and can then be passed to {@link query}
|
|
4453
|
+
* {@link (startAt:1)}, {@link (startAfter:1)}, {@link (endBefore:1)}, {@link (endAt:1)},
|
|
4454
|
+
* {@link limit} or {@link limitToLast} and can then be passed to {@link (query:1)}
|
|
4399
4455
|
* to create a new query instance that also contains the `QueryConstraint`.
|
|
4400
4456
|
*/
|
|
4401
4457
|
export declare type QueryNonFilterConstraint = QueryOrderByConstraint | QueryLimitConstraint | QueryStartAtConstraint | QueryEndAtConstraint;
|
|
@@ -4403,7 +4459,7 @@ export declare type QueryNonFilterConstraint = QueryOrderByConstraint | QueryLim
|
|
|
4403
4459
|
/**
|
|
4404
4460
|
* A `QueryOrderByConstraint` is used to sort the set of documents returned by a
|
|
4405
4461
|
* Firestore query. `QueryOrderByConstraint`s are created by invoking
|
|
4406
|
-
* {@link orderBy} and can then be passed to {@link query} to create a new query
|
|
4462
|
+
* {@link orderBy} and can then be passed to {@link (query:1)} to create a new query
|
|
4407
4463
|
* instance that also contains this `QueryOrderByConstraint`.
|
|
4408
4464
|
*
|
|
4409
4465
|
* Note: Documents that do not contain the orderBy field will not be present in
|
|
@@ -4474,7 +4530,7 @@ export declare class QuerySnapshot<T = DocumentData> {
|
|
|
4474
4530
|
* A `QueryStartAtConstraint` is used to exclude documents from the start of a
|
|
4475
4531
|
* result set returned by a Firestore query.
|
|
4476
4532
|
* `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or
|
|
4477
|
-
* {@link (startAfter:1)} and can then be passed to {@link query} to create a
|
|
4533
|
+
* {@link (startAfter:1)} and can then be passed to {@link (query:1)} to create a
|
|
4478
4534
|
* new query instance that also contains this `QueryStartAtConstraint`.
|
|
4479
4535
|
*/
|
|
4480
4536
|
export declare class QueryStartAtConstraint extends QueryConstraint {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore",
|
|
3
|
-
"version": "3.9.0
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=10.10.0"
|
|
6
6
|
},
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"lite/package.json"
|
|
91
91
|
],
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@firebase/component": "0.6.4
|
|
93
|
+
"@firebase/component": "0.6.4",
|
|
94
94
|
"@firebase/logger": "0.4.0",
|
|
95
|
-
"@firebase/util": "1.9.3
|
|
95
|
+
"@firebase/util": "1.9.3",
|
|
96
96
|
"@firebase/webchannel-wrapper": "0.9.0",
|
|
97
97
|
"@grpc/grpc-js": "~1.7.0",
|
|
98
98
|
"@grpc/proto-loader": "^0.6.13",
|
|
@@ -100,12 +100,12 @@
|
|
|
100
100
|
"tslib": "^2.1.0"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
|
-
"@firebase/app": "0.
|
|
103
|
+
"@firebase/app": "0.x"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
|
-
"@firebase/app": "0.9.
|
|
107
|
-
"@firebase/app-compat": "0.2.
|
|
108
|
-
"@firebase/auth": "0.21.
|
|
106
|
+
"@firebase/app": "0.9.5",
|
|
107
|
+
"@firebase/app-compat": "0.2.5",
|
|
108
|
+
"@firebase/auth": "0.21.5",
|
|
109
109
|
"@rollup/plugin-alias": "3.1.9",
|
|
110
110
|
"@rollup/plugin-json": "4.1.0",
|
|
111
111
|
"@types/eslint": "7.29.0",
|