@firebase/firestore 3.7.3 → 3.8.0-canary.20e5ef7fb
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 +18 -0
- package/dist/firestore/lite/index.d.ts +1 -1
- package/dist/firestore/src/api/filter.d.ts +1 -1
- package/dist/firestore/src/api/reference_impl.d.ts +2 -1
- package/dist/firestore/src/api.d.ts +1 -1
- package/dist/firestore/src/core/bound.d.ts +49 -0
- package/dist/firestore/src/core/filter.d.ts +134 -0
- package/dist/firestore/src/core/order_by.d.ts +35 -0
- package/dist/firestore/src/core/query.d.ts +5 -6
- package/dist/firestore/src/core/target.d.ts +4 -120
- package/dist/firestore/src/lite-api/query.d.ts +273 -66
- package/dist/firestore/src/local/indexeddb_index_manager.d.ts +2 -0
- package/dist/firestore/src/local/local_documents_view.d.ts +0 -2
- package/dist/firestore/src/model/document.d.ts +8 -1
- package/dist/firestore/src/protos/firestore_proto_api.d.ts +1 -1
- package/dist/firestore/src/remote/serializer.d.ts +10 -3
- package/dist/firestore/src/util/logic_utils.d.ts +52 -0
- package/dist/firestore/src/util/types.d.ts +1 -1
- package/dist/firestore/test/lite/helpers.d.ts +1 -1
- package/dist/firestore/test/unit/core/filter.test.d.ts +17 -0
- package/dist/firestore/test/unit/specs/spec_test_runner.d.ts +2 -1
- package/dist/firestore/test/unit/util/logic_utils.test.d.ts +17 -0
- package/dist/firestore/test/util/helpers.d.ts +6 -2
- package/dist/firestore/test/util/test_platform.d.ts +2 -2
- package/dist/index.d.ts +140 -63
- package/dist/index.esm2017.js +4297 -3743
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +4982 -4410
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +1659 -890
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +1652 -891
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +4522 -3968
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +330 -69
- package/dist/lite/firestore/lite/index.d.ts +1 -1
- package/dist/lite/firestore/src/api/filter.d.ts +1 -1
- package/dist/lite/firestore/src/api/reference_impl.d.ts +2 -1
- package/dist/lite/firestore/src/api.d.ts +1 -1
- package/dist/lite/firestore/src/core/bound.d.ts +49 -0
- package/dist/lite/firestore/src/core/filter.d.ts +134 -0
- package/dist/lite/firestore/src/core/order_by.d.ts +35 -0
- package/dist/lite/firestore/src/core/query.d.ts +5 -6
- package/dist/lite/firestore/src/core/target.d.ts +4 -120
- package/dist/lite/firestore/src/lite-api/query.d.ts +273 -66
- package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +2 -0
- package/dist/lite/firestore/src/local/local_documents_view.d.ts +0 -2
- package/dist/lite/firestore/src/model/document.d.ts +8 -1
- package/dist/lite/firestore/src/protos/firestore_proto_api.d.ts +1 -1
- package/dist/lite/firestore/src/remote/serializer.d.ts +10 -3
- package/dist/lite/firestore/src/util/logic_utils.d.ts +52 -0
- package/dist/lite/firestore/src/util/types.d.ts +1 -1
- package/dist/lite/firestore/test/lite/helpers.d.ts +1 -1
- package/dist/lite/firestore/test/unit/core/filter.test.d.ts +17 -0
- package/dist/lite/firestore/test/unit/specs/spec_test_runner.d.ts +2 -1
- package/dist/lite/firestore/test/unit/util/logic_utils.test.d.ts +17 -0
- package/dist/lite/firestore/test/util/helpers.d.ts +6 -2
- package/dist/lite/firestore/test/util/test_platform.d.ts +2 -2
- package/dist/lite/index.browser.esm2017.js +2091 -1793
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +2219 -1980
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +138 -62
- package/dist/lite/index.node.cjs.js +2212 -1802
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +2205 -1803
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +2077 -1778
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +328 -66
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +322 -174
- package/dist/lite/packages/firestore/lite/index.d.ts +1 -1
- package/dist/lite/packages/firestore/rollup.config.debug.d.ts +1 -1
- package/dist/lite/packages/firestore/src/api/filter.d.ts +1 -1
- package/dist/lite/packages/firestore/src/api/reference_impl.d.ts +2 -1
- package/dist/lite/packages/firestore/src/api.d.ts +1 -1
- package/dist/lite/packages/firestore/src/core/bound.d.ts +49 -0
- package/dist/lite/packages/firestore/src/core/filter.d.ts +134 -0
- package/dist/lite/packages/firestore/src/core/order_by.d.ts +35 -0
- package/dist/lite/packages/firestore/src/core/query.d.ts +5 -6
- package/dist/lite/packages/firestore/src/core/target.d.ts +4 -120
- package/dist/lite/packages/firestore/src/lite-api/query.d.ts +273 -66
- package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +2 -0
- package/dist/lite/packages/firestore/src/local/local_documents_view.d.ts +0 -2
- package/dist/lite/packages/firestore/src/model/document.d.ts +8 -1
- package/dist/lite/packages/firestore/src/protos/firestore_proto_api.d.ts +1 -1
- package/dist/lite/packages/firestore/src/remote/serializer.d.ts +10 -3
- package/dist/lite/packages/firestore/src/util/logic_utils.d.ts +52 -0
- package/dist/lite/packages/firestore/src/util/types.d.ts +1 -1
- package/dist/lite/packages/firestore/test/lite/helpers.d.ts +1 -1
- package/dist/lite/packages/firestore/test/unit/core/filter.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/unit/specs/spec_test_runner.d.ts +2 -1
- package/dist/lite/packages/firestore/test/unit/util/logic_utils.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/util/helpers.d.ts +6 -2
- package/dist/lite/packages/firestore/test/util/test_platform.d.ts +2 -2
- package/dist/lite/private.d.ts +240 -66
- package/dist/packages/firestore/dist/index.esm2017.d.ts +370 -209
- package/dist/packages/firestore/lite/index.d.ts +1 -1
- package/dist/packages/firestore/rollup.config.debug.d.ts +1 -1
- package/dist/packages/firestore/src/api/filter.d.ts +1 -1
- package/dist/packages/firestore/src/api/reference_impl.d.ts +2 -1
- package/dist/packages/firestore/src/api.d.ts +1 -1
- package/dist/packages/firestore/src/core/bound.d.ts +49 -0
- package/dist/packages/firestore/src/core/filter.d.ts +134 -0
- package/dist/packages/firestore/src/core/order_by.d.ts +35 -0
- package/dist/packages/firestore/src/core/query.d.ts +5 -6
- package/dist/packages/firestore/src/core/target.d.ts +4 -120
- package/dist/packages/firestore/src/lite-api/query.d.ts +273 -66
- package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +2 -0
- package/dist/packages/firestore/src/local/local_documents_view.d.ts +0 -2
- package/dist/packages/firestore/src/model/document.d.ts +8 -1
- package/dist/packages/firestore/src/protos/firestore_proto_api.d.ts +1 -1
- package/dist/packages/firestore/src/remote/serializer.d.ts +10 -3
- package/dist/packages/firestore/src/util/logic_utils.d.ts +52 -0
- package/dist/packages/firestore/src/util/types.d.ts +1 -1
- package/dist/packages/firestore/test/lite/helpers.d.ts +1 -1
- package/dist/packages/firestore/test/unit/core/filter.test.d.ts +17 -0
- package/dist/packages/firestore/test/unit/specs/spec_test_runner.d.ts +2 -1
- package/dist/packages/firestore/test/unit/util/logic_utils.test.d.ts +17 -0
- package/dist/packages/firestore/test/util/helpers.d.ts +6 -2
- package/dist/packages/firestore/test/util/test_platform.d.ts +2 -2
- package/dist/private.d.ts +242 -69
- package/package.json +14 -12
package/dist/internal.d.ts
CHANGED
|
@@ -127,10 +127,34 @@ export declare type AggregateSpecData<T extends AggregateSpec> = {
|
|
|
127
127
|
[P in keyof T]: T[P] extends AggregateField<infer U> ? U : never;
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Creates a {@link QueryCompositeFilterConstraint} that performs a logical AND
|
|
132
|
+
* of all the provided {@link QueryFilterConstraint}s.
|
|
133
|
+
*
|
|
134
|
+
* @param queryConstraints - Optional. The {@link QueryFilterConstraint}s
|
|
135
|
+
* for AND operation. These must be created with calls to {@link where},
|
|
136
|
+
* {@link or}, or {@link and}.
|
|
137
|
+
* @returns The created {@link QueryCompositeFilterConstraint}.
|
|
138
|
+
* @internal TODO remove this internal tag with OR Query support in the server
|
|
139
|
+
*/
|
|
140
|
+
export declare function and(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
141
|
+
|
|
130
142
|
declare interface ApiClientObjectMap<T> {
|
|
131
143
|
[k: string]: T;
|
|
132
144
|
}
|
|
133
145
|
|
|
146
|
+
/**
|
|
147
|
+
* An `AppliableConstraint` is an abstraction of a constraint that can be applied
|
|
148
|
+
* to a Firestore query.
|
|
149
|
+
*/
|
|
150
|
+
declare abstract class AppliableConstraint {
|
|
151
|
+
/**
|
|
152
|
+
* Takes the provided {@link Query} and returns a copy of the {@link Query} with this
|
|
153
|
+
* {@link AppliableConstraint} applied.
|
|
154
|
+
*/
|
|
155
|
+
abstract _apply<T>(query: Query<T>): Query<T>;
|
|
156
|
+
}
|
|
157
|
+
|
|
134
158
|
/**
|
|
135
159
|
* Returns a special value that can be used with {@link (setDoc:1)} or {@link
|
|
136
160
|
* updateDoc:1} that tells the server to remove the given elements from any
|
|
@@ -636,7 +660,12 @@ declare interface ComponentConfiguration {
|
|
|
636
660
|
maxConcurrentLimboResolutions: number;
|
|
637
661
|
}
|
|
638
662
|
|
|
639
|
-
declare type CompositeFilterOp = 'OPERATOR_UNSPECIFIED' | 'AND';
|
|
663
|
+
declare type CompositeFilterOp = 'OPERATOR_UNSPECIFIED' | 'AND' | 'OR';
|
|
664
|
+
|
|
665
|
+
declare const enum CompositeOperator {
|
|
666
|
+
OR = "or",
|
|
667
|
+
AND = "and"
|
|
668
|
+
}
|
|
640
669
|
|
|
641
670
|
/**
|
|
642
671
|
* Modify this instance to communicate with the Cloud Firestore emulator.
|
|
@@ -920,6 +949,12 @@ declare interface Document_2 {
|
|
|
920
949
|
* `SnapshotVersion.min()` for documents created by the user.
|
|
921
950
|
*/
|
|
922
951
|
readonly readTime: SnapshotVersion;
|
|
952
|
+
/**
|
|
953
|
+
* The timestamp at which the document was created. This value increases
|
|
954
|
+
* monotonically when a document is deleted then recreated. It can also be
|
|
955
|
+
* compared to `createTime` of other documents and the `readTime` of a query.
|
|
956
|
+
*/
|
|
957
|
+
readonly createTime: SnapshotVersion;
|
|
923
958
|
/** The underlying data of this document or an empty value if no data exists. */
|
|
924
959
|
readonly data: ObjectValue;
|
|
925
960
|
/** Returns whether local mutations were applied via the mutation queue. */
|
|
@@ -1383,48 +1418,48 @@ export declare function enableMultiTabIndexedDbPersistence(firestore: Firestore)
|
|
|
1383
1418
|
export declare function enableNetwork(firestore: Firestore): Promise<void>;
|
|
1384
1419
|
|
|
1385
1420
|
/**
|
|
1386
|
-
* Creates a {@link
|
|
1387
|
-
* provided document (inclusive). The end position is relative to the order
|
|
1388
|
-
* the query. The document must contain all of the fields provided in the
|
|
1421
|
+
* Creates a {@link QueryEndAtConstraint} that modifies the result set to end at
|
|
1422
|
+
* the provided document (inclusive). The end position is relative to the order
|
|
1423
|
+
* of the query. The document must contain all of the fields provided in the
|
|
1389
1424
|
* orderBy of the query.
|
|
1390
1425
|
*
|
|
1391
1426
|
* @param snapshot - The snapshot of the document to end at.
|
|
1392
|
-
* @returns A {@link
|
|
1427
|
+
* @returns A {@link QueryEndAtConstraint} to pass to `query()`
|
|
1393
1428
|
*/
|
|
1394
|
-
export declare function endAt(snapshot: DocumentSnapshot_2<unknown>):
|
|
1429
|
+
export declare function endAt(snapshot: DocumentSnapshot_2<unknown>): QueryEndAtConstraint;
|
|
1395
1430
|
|
|
1396
1431
|
/**
|
|
1397
|
-
* Creates a {@link
|
|
1398
|
-
* provided fields relative to the order of the query. The order of the field
|
|
1432
|
+
* Creates a {@link QueryEndAtConstraint} that modifies the result set to end at
|
|
1433
|
+
* the provided fields relative to the order of the query. The order of the field
|
|
1399
1434
|
* values must match the order of the order by clauses of the query.
|
|
1400
1435
|
*
|
|
1401
1436
|
* @param fieldValues - The field values to end this query at, in order
|
|
1402
1437
|
* of the query's order by.
|
|
1403
|
-
* @returns A {@link
|
|
1438
|
+
* @returns A {@link QueryEndAtConstraint} to pass to `query()`
|
|
1404
1439
|
*/
|
|
1405
|
-
export declare function endAt(...fieldValues: unknown[]):
|
|
1440
|
+
export declare function endAt(...fieldValues: unknown[]): QueryEndAtConstraint;
|
|
1406
1441
|
|
|
1407
1442
|
/**
|
|
1408
|
-
* Creates a {@link
|
|
1409
|
-
* provided document (exclusive). The end position is relative to the
|
|
1410
|
-
* the query. The document must contain all of the fields provided in
|
|
1411
|
-
* orderBy of the query.
|
|
1443
|
+
* Creates a {@link QueryEndAtConstraint} that modifies the result set to end
|
|
1444
|
+
* before the provided document (exclusive). The end position is relative to the
|
|
1445
|
+
* order of the query. The document must contain all of the fields provided in
|
|
1446
|
+
* the orderBy of the query.
|
|
1412
1447
|
*
|
|
1413
1448
|
* @param snapshot - The snapshot of the document to end before.
|
|
1414
|
-
* @returns A {@link
|
|
1449
|
+
* @returns A {@link QueryEndAtConstraint} to pass to `query()`
|
|
1415
1450
|
*/
|
|
1416
|
-
export declare function endBefore(snapshot: DocumentSnapshot_2<unknown>):
|
|
1451
|
+
export declare function endBefore(snapshot: DocumentSnapshot_2<unknown>): QueryEndAtConstraint;
|
|
1417
1452
|
|
|
1418
1453
|
/**
|
|
1419
|
-
* Creates a {@link
|
|
1420
|
-
* provided fields relative to the order of the query. The order of
|
|
1421
|
-
* values must match the order of the order by clauses of the query.
|
|
1454
|
+
* Creates a {@link QueryEndAtConstraint} that modifies the result set to end
|
|
1455
|
+
* before the provided fields relative to the order of the query. The order of
|
|
1456
|
+
* the field values must match the order of the order by clauses of the query.
|
|
1422
1457
|
*
|
|
1423
1458
|
* @param fieldValues - The field values to end this query before, in order
|
|
1424
1459
|
* of the query's order by.
|
|
1425
|
-
* @returns A {@link
|
|
1460
|
+
* @returns A {@link QueryEndAtConstraint} to pass to `query()`
|
|
1426
1461
|
*/
|
|
1427
|
-
export declare function endBefore(...fieldValues: unknown[]):
|
|
1462
|
+
export declare function endBefore(...fieldValues: unknown[]): QueryEndAtConstraint;
|
|
1428
1463
|
|
|
1429
1464
|
/**
|
|
1430
1465
|
* @internal
|
|
@@ -1456,6 +1491,24 @@ declare interface EventManager {
|
|
|
1456
1491
|
*/
|
|
1457
1492
|
export declare function executeWrite(firestore: Firestore, mutations: Mutation[]): Promise<void>;
|
|
1458
1493
|
|
|
1494
|
+
declare class FieldFilter extends Filter {
|
|
1495
|
+
readonly field: _FieldPath;
|
|
1496
|
+
readonly op: Operator;
|
|
1497
|
+
readonly value: Value;
|
|
1498
|
+
protected constructor(field: _FieldPath, op: Operator, value: Value);
|
|
1499
|
+
/**
|
|
1500
|
+
* Creates a filter based on the provided arguments.
|
|
1501
|
+
*/
|
|
1502
|
+
static create(field: _FieldPath, op: Operator, value: Value): FieldFilter;
|
|
1503
|
+
private static createKeyFieldInFilter;
|
|
1504
|
+
matches(doc: Document_2): boolean;
|
|
1505
|
+
protected matchesComparison(comparison: number): boolean;
|
|
1506
|
+
isInequality(): boolean;
|
|
1507
|
+
getFlattenedFilters(): readonly FieldFilter[];
|
|
1508
|
+
getFilters(): Filter[];
|
|
1509
|
+
getFirstInequalityField(): _FieldPath | null;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1459
1512
|
declare type FieldFilterOp = 'OPERATOR_UNSPECIFIED' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL' | 'EQUAL' | 'NOT_EQUAL' | 'ARRAY_CONTAINS' | 'IN' | 'ARRAY_CONTAINS_ANY' | 'NOT_IN';
|
|
1460
1513
|
|
|
1461
1514
|
/**
|
|
@@ -1615,6 +1668,9 @@ export declare abstract class FieldValue {
|
|
|
1615
1668
|
|
|
1616
1669
|
declare abstract class Filter {
|
|
1617
1670
|
abstract matches(doc: Document_2): boolean;
|
|
1671
|
+
abstract getFlattenedFilters(): readonly FieldFilter[];
|
|
1672
|
+
abstract getFilters(): Filter[];
|
|
1673
|
+
abstract getFirstInequalityField(): _FieldPath | null;
|
|
1618
1674
|
}
|
|
1619
1675
|
|
|
1620
1676
|
/**
|
|
@@ -2484,7 +2540,8 @@ export declare function getDocs<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
|
|
|
2484
2540
|
|
|
2485
2541
|
/**
|
|
2486
2542
|
* Executes the query and returns the results as a `QuerySnapshot` from cache.
|
|
2487
|
-
* Returns an
|
|
2543
|
+
* Returns an empty result set if no documents matching the query are currently
|
|
2544
|
+
* cached.
|
|
2488
2545
|
*
|
|
2489
2546
|
* @returns A `Promise` that will be resolved with the results of the query.
|
|
2490
2547
|
*/
|
|
@@ -2817,23 +2874,25 @@ export declare function initializeFirestore(app: FirebaseApp, settings: Firestor
|
|
|
2817
2874
|
export declare function _isBase64Available(): boolean;
|
|
2818
2875
|
|
|
2819
2876
|
/**
|
|
2820
|
-
* Creates a {@link
|
|
2877
|
+
* Creates a {@link QueryLimitConstraint} that only returns the first matching
|
|
2878
|
+
* documents.
|
|
2821
2879
|
*
|
|
2822
2880
|
* @param limit - The maximum number of items to return.
|
|
2823
|
-
* @returns The created {@link
|
|
2881
|
+
* @returns The created {@link QueryLimitConstraint}.
|
|
2824
2882
|
*/
|
|
2825
|
-
export declare function limit(limit: number):
|
|
2883
|
+
export declare function limit(limit: number): QueryLimitConstraint;
|
|
2826
2884
|
|
|
2827
2885
|
/**
|
|
2828
|
-
* Creates a {@link
|
|
2886
|
+
* Creates a {@link QueryLimitConstraint} that only returns the last matching
|
|
2887
|
+
* documents.
|
|
2829
2888
|
*
|
|
2830
2889
|
* You must specify at least one `orderBy` clause for `limitToLast` queries,
|
|
2831
2890
|
* otherwise an exception will be thrown during execution.
|
|
2832
2891
|
*
|
|
2833
2892
|
* @param limit - The maximum number of items to return.
|
|
2834
|
-
* @returns The created {@link
|
|
2893
|
+
* @returns The created {@link QueryLimitConstraint}.
|
|
2835
2894
|
*/
|
|
2836
|
-
export declare function limitToLast(limit: number):
|
|
2895
|
+
export declare function limitToLast(limit: number): QueryLimitConstraint;
|
|
2837
2896
|
|
|
2838
2897
|
declare const enum LimitType {
|
|
2839
2898
|
First = "F",
|
|
@@ -3076,8 +3135,6 @@ declare class LocalDocumentsView {
|
|
|
3076
3135
|
private getDocumentsMatchingDocumentQuery;
|
|
3077
3136
|
private getDocumentsMatchingCollectionGroupQuery;
|
|
3078
3137
|
private getDocumentsMatchingCollectionQuery;
|
|
3079
|
-
/** Returns a base document that can be used to apply `overlay`. */
|
|
3080
|
-
private getBaseDocument;
|
|
3081
3138
|
}
|
|
3082
3139
|
|
|
3083
3140
|
declare interface LocalStore {
|
|
@@ -3165,6 +3222,7 @@ declare class MutableDocument implements Document_2 {
|
|
|
3165
3222
|
private documentType;
|
|
3166
3223
|
version: SnapshotVersion;
|
|
3167
3224
|
readTime: SnapshotVersion;
|
|
3225
|
+
createTime: SnapshotVersion;
|
|
3168
3226
|
data: ObjectValue;
|
|
3169
3227
|
private documentState;
|
|
3170
3228
|
private constructor();
|
|
@@ -3177,7 +3235,7 @@ declare class MutableDocument implements Document_2 {
|
|
|
3177
3235
|
* Creates a new document that is known to exist with the given data at the
|
|
3178
3236
|
* given version.
|
|
3179
3237
|
*/
|
|
3180
|
-
static newFoundDocument(documentKey: _DocumentKey, version: SnapshotVersion, value: ObjectValue): MutableDocument;
|
|
3238
|
+
static newFoundDocument(documentKey: _DocumentKey, version: SnapshotVersion, createTime: SnapshotVersion, value: ObjectValue): MutableDocument;
|
|
3181
3239
|
/** Creates a new document that is known to not exist at the given version. */
|
|
3182
3240
|
static newNoDocument(documentKey: _DocumentKey, version: SnapshotVersion): MutableDocument;
|
|
3183
3241
|
/**
|
|
@@ -3911,6 +3969,31 @@ export declare function onSnapshotsInSync(firestore: Firestore, observer: {
|
|
|
3911
3969
|
*/
|
|
3912
3970
|
export declare function onSnapshotsInSync(firestore: Firestore, onSync: () => void): Unsubscribe;
|
|
3913
3971
|
|
|
3972
|
+
declare const enum Operator {
|
|
3973
|
+
LESS_THAN = "<",
|
|
3974
|
+
LESS_THAN_OR_EQUAL = "<=",
|
|
3975
|
+
EQUAL = "==",
|
|
3976
|
+
NOT_EQUAL = "!=",
|
|
3977
|
+
GREATER_THAN = ">",
|
|
3978
|
+
GREATER_THAN_OR_EQUAL = ">=",
|
|
3979
|
+
ARRAY_CONTAINS = "array-contains",
|
|
3980
|
+
IN = "in",
|
|
3981
|
+
NOT_IN = "not-in",
|
|
3982
|
+
ARRAY_CONTAINS_ANY = "array-contains-any"
|
|
3983
|
+
}
|
|
3984
|
+
|
|
3985
|
+
/**
|
|
3986
|
+
* Creates a {@link QueryCompositeFilterConstraint} that performs a logical OR
|
|
3987
|
+
* of all the provided {@link QueryFilterConstraint}s.
|
|
3988
|
+
*
|
|
3989
|
+
* @param queryConstraints - Optional. The {@link QueryFilterConstraint}s
|
|
3990
|
+
* for OR operation. These must be created with calls to {@link where},
|
|
3991
|
+
* {@link or}, or {@link and}.
|
|
3992
|
+
* @returns The created {@link QueryCompositeFilterConstraint}.
|
|
3993
|
+
* @internal TODO remove this internal tag with OR Query support in the server
|
|
3994
|
+
*/
|
|
3995
|
+
export declare function or(...queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
3996
|
+
|
|
3914
3997
|
/**
|
|
3915
3998
|
* An ordering on a field, in some Direction. Direction defaults to ASCENDING.
|
|
3916
3999
|
*/
|
|
@@ -3921,15 +4004,18 @@ declare class OrderBy {
|
|
|
3921
4004
|
}
|
|
3922
4005
|
|
|
3923
4006
|
/**
|
|
3924
|
-
* Creates a {@link
|
|
4007
|
+
* Creates a {@link QueryOrderByConstraint} that sorts the query result by the
|
|
3925
4008
|
* specified field, optionally in descending order instead of ascending.
|
|
3926
4009
|
*
|
|
4010
|
+
* Note: Documents that do not contain the specified field will not be present
|
|
4011
|
+
* in the query result.
|
|
4012
|
+
*
|
|
3927
4013
|
* @param fieldPath - The field to sort by.
|
|
3928
4014
|
* @param directionStr - Optional direction to sort by ('asc' or 'desc'). If
|
|
3929
4015
|
* not specified, order will be ascending.
|
|
3930
|
-
* @returns The created {@link
|
|
4016
|
+
* @returns The created {@link QueryOrderByConstraint}.
|
|
3931
4017
|
*/
|
|
3932
|
-
export declare function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection):
|
|
4018
|
+
export declare function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): QueryOrderByConstraint;
|
|
3933
4019
|
|
|
3934
4020
|
/**
|
|
3935
4021
|
* The direction of a {@link orderBy} clause is specified as 'desc' or 'asc'
|
|
@@ -4324,10 +4410,28 @@ export declare class Query<T = DocumentData> {
|
|
|
4324
4410
|
}
|
|
4325
4411
|
|
|
4326
4412
|
/**
|
|
4327
|
-
* Creates a new immutable instance of {@link Query} that is extended to also
|
|
4328
|
-
* additional query constraints.
|
|
4413
|
+
* Creates a new immutable instance of {@link Query} that is extended to also
|
|
4414
|
+
* include additional query constraints.
|
|
4329
4415
|
*
|
|
4330
|
-
* @param query - The {@link Query} instance to use as a base for the new
|
|
4416
|
+
* @param query - The {@link Query} instance to use as a base for the new
|
|
4417
|
+
* constraints.
|
|
4418
|
+
* @param compositeFilter - The {@link QueryCompositeFilterConstraint} to
|
|
4419
|
+
* apply. Create {@link QueryCompositeFilterConstraint} using {@link and} or
|
|
4420
|
+
* {@link or}.
|
|
4421
|
+
* @param queryConstraints - Additional {@link QueryNonFilterConstraint}s to
|
|
4422
|
+
* apply (e.g. {@link orderBy}, {@link limit}).
|
|
4423
|
+
* @throws if any of the provided query constraints cannot be combined with the
|
|
4424
|
+
* existing or new constraints.
|
|
4425
|
+
* @internal TODO remove this internal tag with OR Query support in the server
|
|
4426
|
+
*/
|
|
4427
|
+
export declare function query<T>(query: Query<T>, compositeFilter: QueryCompositeFilterConstraint, ...queryConstraints: QueryNonFilterConstraint[]): Query<T>;
|
|
4428
|
+
|
|
4429
|
+
/**
|
|
4430
|
+
* Creates a new immutable instance of {@link Query} that is extended to also
|
|
4431
|
+
* include additional query constraints.
|
|
4432
|
+
*
|
|
4433
|
+
* @param query - The {@link Query} instance to use as a base for the new
|
|
4434
|
+
* constraints.
|
|
4331
4435
|
* @param queryConstraints - The list of {@link QueryConstraint}s to apply.
|
|
4332
4436
|
* @throws if any of the provided query constraints cannot be combined with the
|
|
4333
4437
|
* existing or new constraints.
|
|
@@ -4351,20 +4455,46 @@ declare interface Query_2 {
|
|
|
4351
4455
|
readonly endAt: Bound | null;
|
|
4352
4456
|
}
|
|
4353
4457
|
|
|
4458
|
+
/**
|
|
4459
|
+
* A `QueryCompositeFilterConstraint` is used to narrow the set of documents
|
|
4460
|
+
* returned by a Firestore query by performing the logical OR or AND of multiple
|
|
4461
|
+
* {@link QueryFieldFilterConstraint}s or {@link QueryCompositeFilterConstraint}s.
|
|
4462
|
+
* `QueryCompositeFilterConstraint`s are created by invoking {@link or} or
|
|
4463
|
+
* {@link and} and can then be passed to {@link query} to create a new query
|
|
4464
|
+
* instance that also contains the `QueryCompositeFilterConstraint`.
|
|
4465
|
+
* @internal TODO remove this internal tag with OR Query support in the server
|
|
4466
|
+
*/
|
|
4467
|
+
export declare class QueryCompositeFilterConstraint extends AppliableConstraint {
|
|
4468
|
+
/** The type of this query constraint */
|
|
4469
|
+
readonly type: 'or' | 'and';
|
|
4470
|
+
private readonly _queryConstraints;
|
|
4471
|
+
/**
|
|
4472
|
+
* @internal
|
|
4473
|
+
*/
|
|
4474
|
+
protected constructor(
|
|
4475
|
+
/** The type of this query constraint */
|
|
4476
|
+
type: 'or' | 'and', _queryConstraints: QueryFilterConstraint[]);
|
|
4477
|
+
static _create(type: 'or' | 'and', _queryConstraints: QueryFilterConstraint[]): QueryCompositeFilterConstraint;
|
|
4478
|
+
_parse<T>(query: Query<T>): Filter;
|
|
4479
|
+
_apply<T>(query: Query<T>): Query<T>;
|
|
4480
|
+
_getQueryConstraints(): readonly AppliableConstraint[];
|
|
4481
|
+
_getOperator(): CompositeOperator;
|
|
4482
|
+
}
|
|
4483
|
+
|
|
4354
4484
|
/**
|
|
4355
4485
|
* A `QueryConstraint` is used to narrow the set of documents returned by a
|
|
4356
4486
|
* Firestore query. `QueryConstraint`s are created by invoking {@link where},
|
|
4357
|
-
* {@link orderBy}, {@link
|
|
4358
|
-
* endBefore
|
|
4487
|
+
* {@link orderBy}, {@link startAt}, {@link startAfter}, {@link
|
|
4488
|
+
* endBefore}, {@link endAt}, {@link limit}, {@link limitToLast} and
|
|
4359
4489
|
* can then be passed to {@link query} to create a new query instance that
|
|
4360
4490
|
* also contains this `QueryConstraint`.
|
|
4361
4491
|
*/
|
|
4362
|
-
export declare abstract class QueryConstraint {
|
|
4363
|
-
/** The type of this query
|
|
4492
|
+
export declare abstract class QueryConstraint extends AppliableConstraint {
|
|
4493
|
+
/** The type of this query constraint */
|
|
4364
4494
|
abstract readonly type: QueryConstraintType;
|
|
4365
4495
|
/**
|
|
4366
4496
|
* Takes the provided {@link Query} and returns a copy of the {@link Query} with this
|
|
4367
|
-
* {@link
|
|
4497
|
+
* {@link AppliableConstraint} applied.
|
|
4368
4498
|
*/
|
|
4369
4499
|
abstract _apply<T>(query: Query<T>): Query<T>;
|
|
4370
4500
|
}
|
|
@@ -4421,6 +4551,28 @@ declare class QueryDocumentSnapshot_2<T = DocumentData> extends DocumentSnapshot
|
|
|
4421
4551
|
data(): T;
|
|
4422
4552
|
}
|
|
4423
4553
|
|
|
4554
|
+
/**
|
|
4555
|
+
* A `QueryEndAtConstraint` is used to exclude documents from the end of a
|
|
4556
|
+
* result set returned by a Firestore query.
|
|
4557
|
+
* `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or
|
|
4558
|
+
* {@link (endBefore:1)} and can then be passed to {@link query} to create a new
|
|
4559
|
+
* query instance that also contains this `QueryEndAtConstraint`.
|
|
4560
|
+
*/
|
|
4561
|
+
export declare class QueryEndAtConstraint extends QueryConstraint {
|
|
4562
|
+
/** The type of this query constraint */
|
|
4563
|
+
readonly type: 'endBefore' | 'endAt';
|
|
4564
|
+
private readonly _docOrFields;
|
|
4565
|
+
private readonly _inclusive;
|
|
4566
|
+
/**
|
|
4567
|
+
* @internal
|
|
4568
|
+
*/
|
|
4569
|
+
protected constructor(
|
|
4570
|
+
/** The type of this query constraint */
|
|
4571
|
+
type: 'endBefore' | 'endAt', _docOrFields: Array<unknown | DocumentSnapshot_2<unknown>>, _inclusive: boolean);
|
|
4572
|
+
static _create(type: 'endBefore' | 'endAt', _docOrFields: Array<unknown | DocumentSnapshot_2<unknown>>, _inclusive: boolean): QueryEndAtConstraint;
|
|
4573
|
+
_apply<T>(query: Query<T>): Query<T>;
|
|
4574
|
+
}
|
|
4575
|
+
|
|
4424
4576
|
/**
|
|
4425
4577
|
* Returns true if the provided queries point to the same collection and apply
|
|
4426
4578
|
* the same constraints.
|
|
@@ -4432,6 +4584,93 @@ declare class QueryDocumentSnapshot_2<T = DocumentData> extends DocumentSnapshot
|
|
|
4432
4584
|
*/
|
|
4433
4585
|
export declare function queryEqual<T>(left: Query<T>, right: Query<T>): boolean;
|
|
4434
4586
|
|
|
4587
|
+
/**
|
|
4588
|
+
* A `QueryFieldFilterConstraint` is used to narrow the set of documents returned by
|
|
4589
|
+
* a Firestore query by filtering on one or more document fields.
|
|
4590
|
+
* `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then
|
|
4591
|
+
* be passed to {@link query} to create a new query instance that also contains
|
|
4592
|
+
* this `QueryFieldFilterConstraint`.
|
|
4593
|
+
*/
|
|
4594
|
+
export declare class QueryFieldFilterConstraint extends QueryConstraint {
|
|
4595
|
+
private readonly _field;
|
|
4596
|
+
private _op;
|
|
4597
|
+
private _value;
|
|
4598
|
+
/** The type of this query constraint */
|
|
4599
|
+
readonly type = "where";
|
|
4600
|
+
/**
|
|
4601
|
+
* @internal
|
|
4602
|
+
*/
|
|
4603
|
+
protected constructor(_field: _FieldPath, _op: Operator, _value: unknown);
|
|
4604
|
+
static _create(_field: _FieldPath, _op: Operator, _value: unknown): QueryFieldFilterConstraint;
|
|
4605
|
+
_apply<T>(query: Query<T>): Query<T>;
|
|
4606
|
+
_parse<T>(query: Query<T>): FieldFilter;
|
|
4607
|
+
}
|
|
4608
|
+
|
|
4609
|
+
/**
|
|
4610
|
+
* `QueryFilterConstraint` is a helper union type that represents
|
|
4611
|
+
* {@link QueryFieldFilterConstraint} and {@link QueryCompositeFilterConstraint}.
|
|
4612
|
+
* `QueryFilterConstraint`s are created by invoking {@link or} or {@link and}
|
|
4613
|
+
* and can then be passed to {@link query} to create a new query instance that
|
|
4614
|
+
* also contains the `QueryConstraint`.
|
|
4615
|
+
* @internal TODO remove this internal tag with OR Query support in the server
|
|
4616
|
+
*/
|
|
4617
|
+
export declare type QueryFilterConstraint = QueryFieldFilterConstraint | QueryCompositeFilterConstraint;
|
|
4618
|
+
|
|
4619
|
+
/**
|
|
4620
|
+
* A `QueryLimitConstraint` is used to limit the number of documents returned by
|
|
4621
|
+
* a Firestore query.
|
|
4622
|
+
* `QueryLimitConstraint`s are created by invoking {@link limit} or
|
|
4623
|
+
* {@link limitToLast} and can then be passed to {@link query} to create a new
|
|
4624
|
+
* query instance that also contains this `QueryLimitConstraint`.
|
|
4625
|
+
*/
|
|
4626
|
+
export declare class QueryLimitConstraint extends QueryConstraint {
|
|
4627
|
+
/** The type of this query constraint */
|
|
4628
|
+
readonly type: 'limit' | 'limitToLast';
|
|
4629
|
+
private readonly _limit;
|
|
4630
|
+
private readonly _limitType;
|
|
4631
|
+
/**
|
|
4632
|
+
* @internal
|
|
4633
|
+
*/
|
|
4634
|
+
protected constructor(
|
|
4635
|
+
/** The type of this query constraint */
|
|
4636
|
+
type: 'limit' | 'limitToLast', _limit: number, _limitType: LimitType);
|
|
4637
|
+
static _create(type: 'limit' | 'limitToLast', _limit: number, _limitType: LimitType): QueryLimitConstraint;
|
|
4638
|
+
_apply<T>(query: Query<T>): Query<T>;
|
|
4639
|
+
}
|
|
4640
|
+
|
|
4641
|
+
/**
|
|
4642
|
+
* `QueryNonFilterConstraint` is a helper union type that represents
|
|
4643
|
+
* QueryConstraints which are used to narrow or order the set of documents,
|
|
4644
|
+
* but that do not explicitly filter on a document field.
|
|
4645
|
+
* `QueryNonFilterConstraint`s are created by invoking {@link orderBy},
|
|
4646
|
+
* {@link startAt}, {@link startAfter}, {@link endBefore}, {@link endAt},
|
|
4647
|
+
* {@link limit} or {@link limitToLast} and can then be passed to {@link query}
|
|
4648
|
+
* to create a new query instance that also contains the `QueryConstraint`.
|
|
4649
|
+
*/
|
|
4650
|
+
export declare type QueryNonFilterConstraint = QueryOrderByConstraint | QueryLimitConstraint | QueryStartAtConstraint | QueryEndAtConstraint;
|
|
4651
|
+
|
|
4652
|
+
/**
|
|
4653
|
+
* A `QueryOrderByConstraint` is used to sort the set of documents returned by a
|
|
4654
|
+
* Firestore query. `QueryOrderByConstraint`s are created by invoking
|
|
4655
|
+
* {@link orderBy} and can then be passed to {@link query} to create a new query
|
|
4656
|
+
* instance that also contains this `QueryOrderByConstraint`.
|
|
4657
|
+
*
|
|
4658
|
+
* Note: Documents that do not contain the orderBy field will not be present in
|
|
4659
|
+
* the query result.
|
|
4660
|
+
*/
|
|
4661
|
+
export declare class QueryOrderByConstraint extends QueryConstraint {
|
|
4662
|
+
private readonly _field;
|
|
4663
|
+
private _direction;
|
|
4664
|
+
/** The type of this query constraint */
|
|
4665
|
+
readonly type = "orderBy";
|
|
4666
|
+
/**
|
|
4667
|
+
* @internal
|
|
4668
|
+
*/
|
|
4669
|
+
protected constructor(_field: _FieldPath, _direction: Direction);
|
|
4670
|
+
static _create(_field: _FieldPath, _direction: Direction): QueryOrderByConstraint;
|
|
4671
|
+
_apply<T>(query: Query<T>): Query<T>;
|
|
4672
|
+
}
|
|
4673
|
+
|
|
4435
4674
|
/**
|
|
4436
4675
|
* A `QuerySnapshot` contains zero or more `DocumentSnapshot` objects
|
|
4437
4676
|
* representing the results of a query. The documents can be accessed as an
|
|
@@ -4483,6 +4722,28 @@ export declare class QuerySnapshot<T = DocumentData> {
|
|
|
4483
4722
|
docChanges(options?: SnapshotListenOptions): Array<DocumentChange<T>>;
|
|
4484
4723
|
}
|
|
4485
4724
|
|
|
4725
|
+
/**
|
|
4726
|
+
* A `QueryStartAtConstraint` is used to exclude documents from the start of a
|
|
4727
|
+
* result set returned by a Firestore query.
|
|
4728
|
+
* `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or
|
|
4729
|
+
* {@link (startAfter:1)} and can then be passed to {@link query} to create a
|
|
4730
|
+
* new query instance that also contains this `QueryStartAtConstraint`.
|
|
4731
|
+
*/
|
|
4732
|
+
export declare class QueryStartAtConstraint extends QueryConstraint {
|
|
4733
|
+
/** The type of this query constraint */
|
|
4734
|
+
readonly type: 'startAt' | 'startAfter';
|
|
4735
|
+
private readonly _docOrFields;
|
|
4736
|
+
private readonly _inclusive;
|
|
4737
|
+
/**
|
|
4738
|
+
* @internal
|
|
4739
|
+
*/
|
|
4740
|
+
protected constructor(
|
|
4741
|
+
/** The type of this query constraint */
|
|
4742
|
+
type: 'startAt' | 'startAfter', _docOrFields: Array<unknown | DocumentSnapshot_2<unknown>>, _inclusive: boolean);
|
|
4743
|
+
static _create(type: 'startAt' | 'startAfter', _docOrFields: Array<unknown | DocumentSnapshot_2<unknown>>, _inclusive: boolean): QueryStartAtConstraint;
|
|
4744
|
+
_apply<T>(query: Query<T>): Query<T>;
|
|
4745
|
+
}
|
|
4746
|
+
|
|
4486
4747
|
/** The different states of a watch target. */
|
|
4487
4748
|
declare type QueryTargetState = 'not-current' | 'current' | 'rejected';
|
|
4488
4749
|
|
|
@@ -5234,48 +5495,48 @@ declare class SortedSetIterator<T> {
|
|
|
5234
5495
|
}
|
|
5235
5496
|
|
|
5236
5497
|
/**
|
|
5237
|
-
* Creates a {@link
|
|
5238
|
-
* provided document (exclusive). The starting position is
|
|
5239
|
-
* of the query. The document must contain all of the
|
|
5240
|
-
* orderBy of the query.
|
|
5498
|
+
* Creates a {@link QueryStartAtConstraint} that modifies the result set to
|
|
5499
|
+
* start after the provided document (exclusive). The starting position is
|
|
5500
|
+
* relative to the order of the query. The document must contain all of the
|
|
5501
|
+
* fields provided in the orderBy of the query.
|
|
5241
5502
|
*
|
|
5242
5503
|
* @param snapshot - The snapshot of the document to start after.
|
|
5243
|
-
* @returns A {@link
|
|
5504
|
+
* @returns A {@link QueryStartAtConstraint} to pass to `query()`
|
|
5244
5505
|
*/
|
|
5245
|
-
export declare function startAfter(snapshot: DocumentSnapshot_2<unknown>):
|
|
5506
|
+
export declare function startAfter(snapshot: DocumentSnapshot_2<unknown>): QueryStartAtConstraint;
|
|
5246
5507
|
|
|
5247
5508
|
/**
|
|
5248
|
-
* Creates a {@link
|
|
5249
|
-
* provided fields relative to the order of the query. The order
|
|
5250
|
-
* values must match the order of the order by clauses of the query.
|
|
5509
|
+
* Creates a {@link QueryStartAtConstraint} that modifies the result set to
|
|
5510
|
+
* start after the provided fields relative to the order of the query. The order
|
|
5511
|
+
* of the field values must match the order of the order by clauses of the query.
|
|
5251
5512
|
*
|
|
5252
5513
|
* @param fieldValues - The field values to start this query after, in order
|
|
5253
5514
|
* of the query's order by.
|
|
5254
|
-
* @returns A {@link
|
|
5515
|
+
* @returns A {@link QueryStartAtConstraint} to pass to `query()`
|
|
5255
5516
|
*/
|
|
5256
|
-
export declare function startAfter(...fieldValues: unknown[]):
|
|
5517
|
+
export declare function startAfter(...fieldValues: unknown[]): QueryStartAtConstraint;
|
|
5257
5518
|
|
|
5258
5519
|
/**
|
|
5259
|
-
* Creates a {@link
|
|
5260
|
-
* provided document (inclusive). The starting position is relative
|
|
5261
|
-
* of the query. The document must contain all of the fields
|
|
5262
|
-
* `orderBy` of this query.
|
|
5520
|
+
* Creates a {@link QueryStartAtConstraint} that modifies the result set to
|
|
5521
|
+
* start at the provided document (inclusive). The starting position is relative
|
|
5522
|
+
* to the order of the query. The document must contain all of the fields
|
|
5523
|
+
* provided in the `orderBy` of this query.
|
|
5263
5524
|
*
|
|
5264
5525
|
* @param snapshot - The snapshot of the document to start at.
|
|
5265
|
-
* @returns A {@link
|
|
5526
|
+
* @returns A {@link QueryStartAtConstraint} to pass to `query()`.
|
|
5266
5527
|
*/
|
|
5267
|
-
export declare function startAt(snapshot: DocumentSnapshot_2<unknown>):
|
|
5528
|
+
export declare function startAt(snapshot: DocumentSnapshot_2<unknown>): QueryStartAtConstraint;
|
|
5268
5529
|
|
|
5269
5530
|
/**
|
|
5270
|
-
* Creates a {@link
|
|
5271
|
-
* provided fields relative to the order of the query. The order of
|
|
5272
|
-
* values must match the order of the order by clauses of the query.
|
|
5531
|
+
* Creates a {@link QueryStartAtConstraint} that modifies the result set to
|
|
5532
|
+
* start at the provided fields relative to the order of the query. The order of
|
|
5533
|
+
* the field values must match the order of the order by clauses of the query.
|
|
5273
5534
|
*
|
|
5274
5535
|
* @param fieldValues - The field values to start this query at, in order
|
|
5275
5536
|
* of the query's order by.
|
|
5276
|
-
* @returns A {@link
|
|
5537
|
+
* @returns A {@link QueryStartAtConstraint} to pass to `query()`.
|
|
5277
5538
|
*/
|
|
5278
|
-
export declare function startAt(...fieldValues: unknown[]):
|
|
5539
|
+
export declare function startAt(...fieldValues: unknown[]): QueryStartAtConstraint;
|
|
5279
5540
|
|
|
5280
5541
|
declare type StructuredQuery = firestoreV1ApiClientInterfaces.StructuredQuery;
|
|
5281
5542
|
|
|
@@ -6161,17 +6422,17 @@ declare class ViewSnapshot {
|
|
|
6161
6422
|
export declare function waitForPendingWrites(firestore: Firestore): Promise<void>;
|
|
6162
6423
|
|
|
6163
6424
|
/**
|
|
6164
|
-
* Creates a {@link
|
|
6165
|
-
* specified field and that the value should satisfy the
|
|
6166
|
-
* provided.
|
|
6425
|
+
* Creates a {@link QueryFieldFilterConstraint} that enforces that documents
|
|
6426
|
+
* must contain the specified field and that the value should satisfy the
|
|
6427
|
+
* relation constraint provided.
|
|
6167
6428
|
*
|
|
6168
6429
|
* @param fieldPath - The path to compare
|
|
6169
6430
|
* @param opStr - The operation string (e.g "<", "<=", "==", "<",
|
|
6170
6431
|
* "<=", "!=").
|
|
6171
6432
|
* @param value - The value for comparison
|
|
6172
|
-
* @returns The created {@link
|
|
6433
|
+
* @returns The created {@link QueryFieldFilterConstraint}.
|
|
6173
6434
|
*/
|
|
6174
|
-
export declare function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown):
|
|
6435
|
+
export declare function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): QueryFieldFilterConstraint;
|
|
6175
6436
|
|
|
6176
6437
|
/**
|
|
6177
6438
|
* Filter conditions in a {@link where} clause are specified using the
|
|
@@ -11,7 +11,7 @@ export { AggregateField, AggregateFieldType, AggregateSpec, AggregateSpecData, A
|
|
|
11
11
|
export { FirestoreSettings as Settings } from '../src/lite-api/settings';
|
|
12
12
|
export { Firestore as Firestore, EmulatorMockTokenOptions, initializeFirestore, getFirestore, terminate, connectFirestoreEmulator } from '../src/lite-api/database';
|
|
13
13
|
export { DocumentData, UpdateData, WithFieldValue, PartialWithFieldValue, SetOptions, DocumentReference, Query, CollectionReference, collection, collectionGroup, doc, refEqual, queryEqual } from '../src/lite-api/reference';
|
|
14
|
-
export { endAt, endBefore, startAt, startAfter, limit, limitToLast,
|
|
14
|
+
export { and, endAt, endBefore, startAt, startAfter, limit, limitToLast, where, or, orderBy, query, QueryConstraint, QueryConstraintType, QueryCompositeFilterConstraint, QueryFilterConstraint, QueryFieldFilterConstraint, QueryOrderByConstraint, QueryLimitConstraint, QueryNonFilterConstraint, QueryStartAtConstraint, QueryEndAtConstraint, OrderByDirection, WhereFilterOp } from '../src/lite-api/query';
|
|
15
15
|
export { addDoc, deleteDoc, updateDoc, setDoc, getDoc, getDocs } from '../src/lite-api/reference_impl';
|
|
16
16
|
export { Primitive, NestedUpdateFields, ChildUpdateFields, AddPrefixToKeys, UnionToIntersection } from '../src/lite-api/types';
|
|
17
17
|
export { FieldPath, documentId } from '../src/lite-api/field_path';
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
export { endAt, endBefore, startAfter, startAt, limitToLast, limit, orderBy, OrderByDirection, where, WhereFilterOp, query, QueryConstraint, QueryConstraintType } from '../lite-api/query';
|
|
17
|
+
export { and, endAt, endBefore, startAfter, startAt, limitToLast, limit, or, orderBy, OrderByDirection, where, WhereFilterOp, query, QueryCompositeFilterConstraint, QueryConstraint, QueryConstraintType, QueryFilterConstraint, QueryFieldFilterConstraint, QueryOrderByConstraint, QueryLimitConstraint, QueryStartAtConstraint, QueryEndAtConstraint, QueryNonFilterConstraint } from '../lite-api/query';
|
|
@@ -83,7 +83,8 @@ export declare function getDocFromServer<T>(reference: DocumentReference<T>): Pr
|
|
|
83
83
|
export declare function getDocs<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
|
|
84
84
|
/**
|
|
85
85
|
* Executes the query and returns the results as a `QuerySnapshot` from cache.
|
|
86
|
-
* Returns an
|
|
86
|
+
* Returns an empty result set if no documents matching the query are currently
|
|
87
|
+
* cached.
|
|
87
88
|
*
|
|
88
89
|
* @returns A `Promise` that will be resolved with the results of the query.
|
|
89
90
|
*/
|
|
@@ -22,7 +22,7 @@ export { LoadBundleTask, LoadBundleTaskProgress, TaskState } from './api/bundle'
|
|
|
22
22
|
export { FirestoreSettings, PersistenceSettings } from './api/settings';
|
|
23
23
|
export { DocumentChange, DocumentSnapshot, QueryDocumentSnapshot, QuerySnapshot, snapshotEqual, SnapshotOptions, FirestoreDataConverter, DocumentChangeType, SnapshotMetadata } from './api/snapshot';
|
|
24
24
|
export { DocumentReference, CollectionReference, Query, doc, collection, collectionGroup, SetOptions, DocumentData, UpdateData, WithFieldValue, PartialWithFieldValue, refEqual, queryEqual } from './api/reference';
|
|
25
|
-
export { endAt, endBefore, startAt, startAfter, limit, limitToLast, where, orderBy, query, QueryConstraint, QueryConstraintType, OrderByDirection, WhereFilterOp } from './api/filter';
|
|
25
|
+
export { and, endAt, endBefore, startAt, startAfter, limit, limitToLast, where, or, orderBy, query, QueryConstraint, QueryConstraintType, QueryCompositeFilterConstraint, QueryFilterConstraint, QueryFieldFilterConstraint, QueryOrderByConstraint, QueryLimitConstraint, QueryNonFilterConstraint, QueryStartAtConstraint, QueryEndAtConstraint, OrderByDirection, WhereFilterOp } from './api/filter';
|
|
26
26
|
export { Unsubscribe, SnapshotListenOptions } from './api/reference_impl';
|
|
27
27
|
export { TransactionOptions } from './api/transaction_options';
|
|
28
28
|
export { runTransaction, Transaction } from './api/transaction';
|