@firebase/firestore 3.7.3 → 3.8.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 +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.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 +138 -62
- package/dist/index.esm2017.js +4295 -3742
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +4981 -4410
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +1657 -889
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +1650 -890
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +4520 -3967
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +328 -68
- 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.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 +2239 -2000
- 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.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 +368 -208
- 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.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 +240 -68
- package/package.json +13 -11
package/dist/lite/index.d.ts
CHANGED
|
@@ -453,45 +453,45 @@ export declare class DocumentSnapshot<T = DocumentData> {
|
|
|
453
453
|
}
|
|
454
454
|
export { EmulatorMockTokenOptions };
|
|
455
455
|
/**
|
|
456
|
-
* Creates a {@link
|
|
457
|
-
* provided document (inclusive). The end position is relative to the order
|
|
458
|
-
* the query. The document must contain all of the fields provided in the
|
|
456
|
+
* Creates a {@link QueryEndAtConstraint} that modifies the result set to end at
|
|
457
|
+
* the provided document (inclusive). The end position is relative to the order
|
|
458
|
+
* of the query. The document must contain all of the fields provided in the
|
|
459
459
|
* orderBy of the query.
|
|
460
460
|
*
|
|
461
461
|
* @param snapshot - The snapshot of the document to end at.
|
|
462
|
-
* @returns A {@link
|
|
462
|
+
* @returns A {@link QueryEndAtConstraint} to pass to `query()`
|
|
463
463
|
*/
|
|
464
|
-
export declare function endAt(snapshot: DocumentSnapshot<unknown>):
|
|
464
|
+
export declare function endAt(snapshot: DocumentSnapshot<unknown>): QueryEndAtConstraint;
|
|
465
465
|
/**
|
|
466
|
-
* Creates a {@link
|
|
467
|
-
* provided fields relative to the order of the query. The order of the field
|
|
466
|
+
* Creates a {@link QueryEndAtConstraint} that modifies the result set to end at
|
|
467
|
+
* the provided fields relative to the order of the query. The order of the field
|
|
468
468
|
* values must match the order of the order by clauses of the query.
|
|
469
469
|
*
|
|
470
470
|
* @param fieldValues - The field values to end this query at, in order
|
|
471
471
|
* of the query's order by.
|
|
472
|
-
* @returns A {@link
|
|
472
|
+
* @returns A {@link QueryEndAtConstraint} to pass to `query()`
|
|
473
473
|
*/
|
|
474
|
-
export declare function endAt(...fieldValues: unknown[]):
|
|
474
|
+
export declare function endAt(...fieldValues: unknown[]): QueryEndAtConstraint;
|
|
475
475
|
/**
|
|
476
|
-
* Creates a {@link
|
|
477
|
-
* provided document (exclusive). The end position is relative to the
|
|
478
|
-
* the query. The document must contain all of the fields provided in
|
|
479
|
-
* orderBy of the query.
|
|
476
|
+
* Creates a {@link QueryEndAtConstraint} that modifies the result set to end
|
|
477
|
+
* before the provided document (exclusive). The end position is relative to the
|
|
478
|
+
* order of the query. The document must contain all of the fields provided in
|
|
479
|
+
* the orderBy of the query.
|
|
480
480
|
*
|
|
481
481
|
* @param snapshot - The snapshot of the document to end before.
|
|
482
|
-
* @returns A {@link
|
|
482
|
+
* @returns A {@link QueryEndAtConstraint} to pass to `query()`
|
|
483
483
|
*/
|
|
484
|
-
export declare function endBefore(snapshot: DocumentSnapshot<unknown>):
|
|
484
|
+
export declare function endBefore(snapshot: DocumentSnapshot<unknown>): QueryEndAtConstraint;
|
|
485
485
|
/**
|
|
486
|
-
* Creates a {@link
|
|
487
|
-
* provided fields relative to the order of the query. The order of
|
|
488
|
-
* values must match the order of the order by clauses of the query.
|
|
486
|
+
* Creates a {@link QueryEndAtConstraint} that modifies the result set to end
|
|
487
|
+
* before the provided fields relative to the order of the query. The order of
|
|
488
|
+
* the field values must match the order of the order by clauses of the query.
|
|
489
489
|
*
|
|
490
490
|
* @param fieldValues - The field values to end this query before, in order
|
|
491
491
|
* of the query's order by.
|
|
492
|
-
* @returns A {@link
|
|
492
|
+
* @returns A {@link QueryEndAtConstraint} to pass to `query()`
|
|
493
493
|
*/
|
|
494
|
-
export declare function endBefore(...fieldValues: unknown[]):
|
|
494
|
+
export declare function endBefore(...fieldValues: unknown[]): QueryEndAtConstraint;
|
|
495
495
|
/**
|
|
496
496
|
* A `FieldPath` refers to a field in a document. The path may consist of a
|
|
497
497
|
* single field name (referring to a top-level field in the document), or a
|
|
@@ -820,22 +820,24 @@ export declare function increment(n: number): FieldValue;
|
|
|
820
820
|
export declare function initializeFirestore(app: FirebaseApp, settings: Settings): Firestore;
|
|
821
821
|
/* Excluded declaration from this release type: initializeFirestore */
|
|
822
822
|
/**
|
|
823
|
-
* Creates a {@link
|
|
823
|
+
* Creates a {@link QueryLimitConstraint} that only returns the first matching
|
|
824
|
+
* documents.
|
|
824
825
|
*
|
|
825
826
|
* @param limit - The maximum number of items to return.
|
|
826
|
-
* @returns The created {@link
|
|
827
|
+
* @returns The created {@link QueryLimitConstraint}.
|
|
827
828
|
*/
|
|
828
|
-
export declare function limit(limit: number):
|
|
829
|
+
export declare function limit(limit: number): QueryLimitConstraint;
|
|
829
830
|
/**
|
|
830
|
-
* Creates a {@link
|
|
831
|
+
* Creates a {@link QueryLimitConstraint} that only returns the last matching
|
|
832
|
+
* documents.
|
|
831
833
|
*
|
|
832
834
|
* You must specify at least one `orderBy` clause for `limitToLast` queries,
|
|
833
835
|
* otherwise an exception will be thrown during execution.
|
|
834
836
|
*
|
|
835
837
|
* @param limit - The maximum number of items to return.
|
|
836
|
-
* @returns The created {@link
|
|
838
|
+
* @returns The created {@link QueryLimitConstraint}.
|
|
837
839
|
*/
|
|
838
|
-
export declare function limitToLast(limit: number):
|
|
840
|
+
export declare function limitToLast(limit: number): QueryLimitConstraint;
|
|
839
841
|
export { LogLevel };
|
|
840
842
|
/**
|
|
841
843
|
* For each field (e.g. 'bar'), find all nested keys (e.g. {'bar.baz': T1,
|
|
@@ -846,15 +848,18 @@ export declare type NestedUpdateFields<T extends Record<string, unknown>> = Unio
|
|
|
846
848
|
[K in keyof T & string]: ChildUpdateFields<K, T[K]>;
|
|
847
849
|
}[keyof T & string]>;
|
|
848
850
|
/**
|
|
849
|
-
* Creates a {@link
|
|
851
|
+
* Creates a {@link QueryOrderByConstraint} that sorts the query result by the
|
|
850
852
|
* specified field, optionally in descending order instead of ascending.
|
|
851
853
|
*
|
|
854
|
+
* Note: Documents that do not contain the specified field will not be present
|
|
855
|
+
* in the query result.
|
|
856
|
+
*
|
|
852
857
|
* @param fieldPath - The field to sort by.
|
|
853
858
|
* @param directionStr - Optional direction to sort by ('asc' or 'desc'). If
|
|
854
859
|
* not specified, order will be ascending.
|
|
855
|
-
* @returns The created {@link
|
|
860
|
+
* @returns The created {@link QueryOrderByConstraint}.
|
|
856
861
|
*/
|
|
857
|
-
export declare function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection):
|
|
862
|
+
export declare function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): QueryOrderByConstraint;
|
|
858
863
|
/**
|
|
859
864
|
* The direction of a {@link orderBy} clause is specified as 'desc' or 'asc'
|
|
860
865
|
* (descending or ascending).
|
|
@@ -909,26 +914,29 @@ export declare class Query<T = DocumentData> {
|
|
|
909
914
|
*/
|
|
910
915
|
withConverter<U>(converter: FirestoreDataConverter<U>): Query<U>;
|
|
911
916
|
}
|
|
917
|
+
/* Excluded declaration from this release type: query */
|
|
912
918
|
/**
|
|
913
|
-
* Creates a new immutable instance of {@link Query} that is extended to also
|
|
914
|
-
* additional query constraints.
|
|
919
|
+
* Creates a new immutable instance of {@link Query} that is extended to also
|
|
920
|
+
* include additional query constraints.
|
|
915
921
|
*
|
|
916
|
-
* @param query - The {@link Query} instance to use as a base for the new
|
|
922
|
+
* @param query - The {@link Query} instance to use as a base for the new
|
|
923
|
+
* constraints.
|
|
917
924
|
* @param queryConstraints - The list of {@link QueryConstraint}s to apply.
|
|
918
925
|
* @throws if any of the provided query constraints cannot be combined with the
|
|
919
926
|
* existing or new constraints.
|
|
920
927
|
*/
|
|
921
928
|
export declare function query<T>(query: Query<T>, ...queryConstraints: QueryConstraint[]): Query<T>;
|
|
929
|
+
/* Excluded from this release type: QueryCompositeFilterConstraint */
|
|
922
930
|
/**
|
|
923
931
|
* A `QueryConstraint` is used to narrow the set of documents returned by a
|
|
924
932
|
* Firestore query. `QueryConstraint`s are created by invoking {@link where},
|
|
925
|
-
* {@link orderBy}, {@link
|
|
926
|
-
* endBefore
|
|
933
|
+
* {@link orderBy}, {@link startAt}, {@link startAfter}, {@link
|
|
934
|
+
* endBefore}, {@link endAt}, {@link limit}, {@link limitToLast} and
|
|
927
935
|
* can then be passed to {@link query} to create a new query instance that
|
|
928
936
|
* also contains this `QueryConstraint`.
|
|
929
937
|
*/
|
|
930
938
|
export declare abstract class QueryConstraint {
|
|
931
|
-
/** The type of this query
|
|
939
|
+
/** The type of this query constraint */
|
|
932
940
|
abstract readonly type: QueryConstraintType;
|
|
933
941
|
}
|
|
934
942
|
/** Describes the different query constraints available in this SDK. */
|
|
@@ -953,6 +961,17 @@ export declare class QueryDocumentSnapshot<T = DocumentData> extends DocumentSna
|
|
|
953
961
|
*/
|
|
954
962
|
data(): T;
|
|
955
963
|
}
|
|
964
|
+
/**
|
|
965
|
+
* A `QueryEndAtConstraint` is used to exclude documents from the end of a
|
|
966
|
+
* result set returned by a Firestore query.
|
|
967
|
+
* `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or
|
|
968
|
+
* {@link (endBefore:1)} and can then be passed to {@link query} to create a new
|
|
969
|
+
* query instance that also contains this `QueryEndAtConstraint`.
|
|
970
|
+
*/
|
|
971
|
+
export declare class QueryEndAtConstraint extends QueryConstraint {
|
|
972
|
+
/** The type of this query constraint */
|
|
973
|
+
readonly type: 'endBefore' | 'endAt';
|
|
974
|
+
}
|
|
956
975
|
/**
|
|
957
976
|
* Returns true if the provided queries point to the same collection and apply
|
|
958
977
|
* the same constraints.
|
|
@@ -963,6 +982,52 @@ export declare class QueryDocumentSnapshot<T = DocumentData> extends DocumentSna
|
|
|
963
982
|
* Firestore database.
|
|
964
983
|
*/
|
|
965
984
|
export declare function queryEqual<T>(left: Query<T>, right: Query<T>): boolean;
|
|
985
|
+
/**
|
|
986
|
+
* A `QueryFieldFilterConstraint` is used to narrow the set of documents returned by
|
|
987
|
+
* a Firestore query by filtering on one or more document fields.
|
|
988
|
+
* `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then
|
|
989
|
+
* be passed to {@link query} to create a new query instance that also contains
|
|
990
|
+
* this `QueryFieldFilterConstraint`.
|
|
991
|
+
*/
|
|
992
|
+
export declare class QueryFieldFilterConstraint extends QueryConstraint {
|
|
993
|
+
/** The type of this query constraint */
|
|
994
|
+
readonly type = "where";
|
|
995
|
+
}
|
|
996
|
+
/* Excluded from this release type: QueryFilterConstraint */
|
|
997
|
+
/**
|
|
998
|
+
* A `QueryLimitConstraint` is used to limit the number of documents returned by
|
|
999
|
+
* a Firestore query.
|
|
1000
|
+
* `QueryLimitConstraint`s are created by invoking {@link limit} or
|
|
1001
|
+
* {@link limitToLast} and can then be passed to {@link query} to create a new
|
|
1002
|
+
* query instance that also contains this `QueryLimitConstraint`.
|
|
1003
|
+
*/
|
|
1004
|
+
export declare class QueryLimitConstraint extends QueryConstraint {
|
|
1005
|
+
/** The type of this query constraint */
|
|
1006
|
+
readonly type: 'limit' | 'limitToLast';
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* `QueryNonFilterConstraint` is a helper union type that represents
|
|
1010
|
+
* QueryConstraints which are used to narrow or order the set of documents,
|
|
1011
|
+
* but that do not explicitly filter on a document field.
|
|
1012
|
+
* `QueryNonFilterConstraint`s are created by invoking {@link orderBy},
|
|
1013
|
+
* {@link startAt}, {@link startAfter}, {@link endBefore}, {@link endAt},
|
|
1014
|
+
* {@link limit} or {@link limitToLast} and can then be passed to {@link query}
|
|
1015
|
+
* to create a new query instance that also contains the `QueryConstraint`.
|
|
1016
|
+
*/
|
|
1017
|
+
export declare type QueryNonFilterConstraint = QueryOrderByConstraint | QueryLimitConstraint | QueryStartAtConstraint | QueryEndAtConstraint;
|
|
1018
|
+
/**
|
|
1019
|
+
* A `QueryOrderByConstraint` is used to sort the set of documents returned by a
|
|
1020
|
+
* Firestore query. `QueryOrderByConstraint`s are created by invoking
|
|
1021
|
+
* {@link orderBy} and can then be passed to {@link query} to create a new query
|
|
1022
|
+
* instance that also contains this `QueryOrderByConstraint`.
|
|
1023
|
+
*
|
|
1024
|
+
* Note: Documents that do not contain the orderBy field will not be present in
|
|
1025
|
+
* the query result.
|
|
1026
|
+
*/
|
|
1027
|
+
export declare class QueryOrderByConstraint extends QueryConstraint {
|
|
1028
|
+
/** The type of this query constraint */
|
|
1029
|
+
readonly type = "orderBy";
|
|
1030
|
+
}
|
|
966
1031
|
/**
|
|
967
1032
|
* A `QuerySnapshot` contains zero or more `DocumentSnapshot` objects
|
|
968
1033
|
* representing the results of a query. The documents can be accessed as an
|
|
@@ -992,6 +1057,17 @@ export declare class QuerySnapshot<T = DocumentData> {
|
|
|
992
1057
|
*/
|
|
993
1058
|
forEach(callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: unknown): void;
|
|
994
1059
|
}
|
|
1060
|
+
/**
|
|
1061
|
+
* A `QueryStartAtConstraint` is used to exclude documents from the start of a
|
|
1062
|
+
* result set returned by a Firestore query.
|
|
1063
|
+
* `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or
|
|
1064
|
+
* {@link (startAfter:1)} and can then be passed to {@link query} to create a
|
|
1065
|
+
* new query instance that also contains this `QueryStartAtConstraint`.
|
|
1066
|
+
*/
|
|
1067
|
+
export declare class QueryStartAtConstraint extends QueryConstraint {
|
|
1068
|
+
/** The type of this query constraint */
|
|
1069
|
+
readonly type: 'startAt' | 'startAfter';
|
|
1070
|
+
}
|
|
995
1071
|
/**
|
|
996
1072
|
* Returns true if the provided references are equal.
|
|
997
1073
|
*
|
|
@@ -1121,45 +1197,45 @@ export declare interface Settings {
|
|
|
1121
1197
|
*/
|
|
1122
1198
|
export declare function snapshotEqual<T>(left: DocumentSnapshot<T> | QuerySnapshot<T>, right: DocumentSnapshot<T> | QuerySnapshot<T>): boolean;
|
|
1123
1199
|
/**
|
|
1124
|
-
* Creates a {@link
|
|
1125
|
-
* provided document (exclusive). The starting position is
|
|
1126
|
-
* of the query. The document must contain all of the
|
|
1127
|
-
* orderBy of the query.
|
|
1200
|
+
* Creates a {@link QueryStartAtConstraint} that modifies the result set to
|
|
1201
|
+
* start after the provided document (exclusive). The starting position is
|
|
1202
|
+
* relative to the order of the query. The document must contain all of the
|
|
1203
|
+
* fields provided in the orderBy of the query.
|
|
1128
1204
|
*
|
|
1129
1205
|
* @param snapshot - The snapshot of the document to start after.
|
|
1130
|
-
* @returns A {@link
|
|
1206
|
+
* @returns A {@link QueryStartAtConstraint} to pass to `query()`
|
|
1131
1207
|
*/
|
|
1132
|
-
export declare function startAfter(snapshot: DocumentSnapshot<unknown>):
|
|
1208
|
+
export declare function startAfter(snapshot: DocumentSnapshot<unknown>): QueryStartAtConstraint;
|
|
1133
1209
|
/**
|
|
1134
|
-
* Creates a {@link
|
|
1135
|
-
* provided fields relative to the order of the query. The order
|
|
1136
|
-
* values must match the order of the order by clauses of the query.
|
|
1210
|
+
* Creates a {@link QueryStartAtConstraint} that modifies the result set to
|
|
1211
|
+
* start after the provided fields relative to the order of the query. The order
|
|
1212
|
+
* of the field values must match the order of the order by clauses of the query.
|
|
1137
1213
|
*
|
|
1138
1214
|
* @param fieldValues - The field values to start this query after, in order
|
|
1139
1215
|
* of the query's order by.
|
|
1140
|
-
* @returns A {@link
|
|
1216
|
+
* @returns A {@link QueryStartAtConstraint} to pass to `query()`
|
|
1141
1217
|
*/
|
|
1142
|
-
export declare function startAfter(...fieldValues: unknown[]):
|
|
1218
|
+
export declare function startAfter(...fieldValues: unknown[]): QueryStartAtConstraint;
|
|
1143
1219
|
/**
|
|
1144
|
-
* Creates a {@link
|
|
1145
|
-
* provided document (inclusive). The starting position is relative
|
|
1146
|
-
* of the query. The document must contain all of the fields
|
|
1147
|
-
* `orderBy` of this query.
|
|
1220
|
+
* Creates a {@link QueryStartAtConstraint} that modifies the result set to
|
|
1221
|
+
* start at the provided document (inclusive). The starting position is relative
|
|
1222
|
+
* to the order of the query. The document must contain all of the fields
|
|
1223
|
+
* provided in the `orderBy` of this query.
|
|
1148
1224
|
*
|
|
1149
1225
|
* @param snapshot - The snapshot of the document to start at.
|
|
1150
|
-
* @returns A {@link
|
|
1226
|
+
* @returns A {@link QueryStartAtConstraint} to pass to `query()`.
|
|
1151
1227
|
*/
|
|
1152
|
-
export declare function startAt(snapshot: DocumentSnapshot<unknown>):
|
|
1228
|
+
export declare function startAt(snapshot: DocumentSnapshot<unknown>): QueryStartAtConstraint;
|
|
1153
1229
|
/**
|
|
1154
|
-
* Creates a {@link
|
|
1155
|
-
* provided fields relative to the order of the query. The order of
|
|
1156
|
-
* values must match the order of the order by clauses of the query.
|
|
1230
|
+
* Creates a {@link QueryStartAtConstraint} that modifies the result set to
|
|
1231
|
+
* start at the provided fields relative to the order of the query. The order of
|
|
1232
|
+
* the field values must match the order of the order by clauses of the query.
|
|
1157
1233
|
*
|
|
1158
1234
|
* @param fieldValues - The field values to start this query at, in order
|
|
1159
1235
|
* of the query's order by.
|
|
1160
|
-
* @returns A {@link
|
|
1236
|
+
* @returns A {@link QueryStartAtConstraint} to pass to `query()`.
|
|
1161
1237
|
*/
|
|
1162
|
-
export declare function startAt(...fieldValues: unknown[]):
|
|
1238
|
+
export declare function startAt(...fieldValues: unknown[]): QueryStartAtConstraint;
|
|
1163
1239
|
/**
|
|
1164
1240
|
* Terminates the provided `Firestore` instance.
|
|
1165
1241
|
*
|
|
@@ -1461,17 +1537,17 @@ export declare function updateDoc<T>(reference: DocumentReference<T>, data: Upda
|
|
|
1461
1537
|
*/
|
|
1462
1538
|
export declare function updateDoc(reference: DocumentReference<unknown>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise<void>;
|
|
1463
1539
|
/**
|
|
1464
|
-
* Creates a {@link
|
|
1465
|
-
* specified field and that the value should satisfy the
|
|
1466
|
-
* provided.
|
|
1540
|
+
* Creates a {@link QueryFieldFilterConstraint} that enforces that documents
|
|
1541
|
+
* must contain the specified field and that the value should satisfy the
|
|
1542
|
+
* relation constraint provided.
|
|
1467
1543
|
*
|
|
1468
1544
|
* @param fieldPath - The path to compare
|
|
1469
1545
|
* @param opStr - The operation string (e.g "<", "<=", "==", "<",
|
|
1470
1546
|
* "<=", "!=").
|
|
1471
1547
|
* @param value - The value for comparison
|
|
1472
|
-
* @returns The created {@link
|
|
1548
|
+
* @returns The created {@link QueryFieldFilterConstraint}.
|
|
1473
1549
|
*/
|
|
1474
|
-
export declare function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown):
|
|
1550
|
+
export declare function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown): QueryFieldFilterConstraint;
|
|
1475
1551
|
/**
|
|
1476
1552
|
* Filter conditions in a {@link where} clause are specified using the
|
|
1477
1553
|
* strings '<', '<=', '==', '!=', '>=', '>', 'array-contains', 'in',
|