@firebase/firestore 3.4.4-canary.2dd99ae2d → 3.4.4-canary.7f959622d
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/dist/firestore/src/core/target.d.ts +8 -4
- package/dist/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/firestore/src/local/indexeddb_schema.d.ts +121 -7
- package/dist/firestore/test/util/helpers.d.ts +1 -1
- package/dist/index.esm2017.js +2233 -2144
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +2964 -2912
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +199 -90
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +199 -90
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +2183 -2090
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +2 -2
- package/dist/lite/firestore/src/core/target.d.ts +8 -4
- package/dist/lite/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +121 -7
- package/dist/lite/firestore/test/util/helpers.d.ts +1 -1
- package/dist/lite/index.browser.esm2017.js +301 -298
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +327 -326
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +36 -29
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +36 -29
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +301 -298
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +2 -2
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +90 -90
- package/dist/lite/packages/firestore/src/core/target.d.ts +8 -4
- package/dist/lite/packages/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
- package/dist/lite/packages/firestore/test/util/helpers.d.ts +1 -1
- package/dist/lite/private.d.ts +2 -2
- package/dist/packages/firestore/dist/index.esm2017.d.ts +61 -61
- package/dist/packages/firestore/src/core/target.d.ts +8 -4
- package/dist/packages/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +121 -7
- package/dist/packages/firestore/test/util/helpers.d.ts +1 -1
- package/dist/private.d.ts +2 -2
- package/package.json +9 -9
|
@@ -176,10 +176,9 @@ export declare class ArrayContainsAnyFilter extends FieldFilter {
|
|
|
176
176
|
*/
|
|
177
177
|
export declare class Bound {
|
|
178
178
|
readonly position: ProtoValue[];
|
|
179
|
-
readonly
|
|
180
|
-
constructor(position: ProtoValue[],
|
|
179
|
+
readonly inclusive: boolean;
|
|
180
|
+
constructor(position: ProtoValue[], inclusive: boolean);
|
|
181
181
|
}
|
|
182
|
-
export declare function canonifyBound(bound: Bound): string;
|
|
183
182
|
/**
|
|
184
183
|
* An ordering on a field, in some Direction. Direction defaults to ASCENDING.
|
|
185
184
|
*/
|
|
@@ -191,9 +190,14 @@ export declare class OrderBy {
|
|
|
191
190
|
export declare function canonifyOrderBy(orderBy: OrderBy): string;
|
|
192
191
|
export declare function stringifyOrderBy(orderBy: OrderBy): string;
|
|
193
192
|
export declare function orderByEquals(left: OrderBy, right: OrderBy): boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Returns true if a document sorts after a bound using the provided sort
|
|
195
|
+
* order.
|
|
196
|
+
*/
|
|
197
|
+
export declare function boundSortsAfterDocument(bound: Bound, orderBy: OrderBy[], doc: Document): boolean;
|
|
194
198
|
/**
|
|
195
199
|
* Returns true if a document sorts before a bound using the provided sort
|
|
196
200
|
* order.
|
|
197
201
|
*/
|
|
198
|
-
export declare function
|
|
202
|
+
export declare function boundSortsBeforeDocument(bound: Bound, orderBy: OrderBy[], doc: Document): boolean;
|
|
199
203
|
export declare function boundEquals(left: Bound | null, right: Bound | null): boolean;
|
|
@@ -196,8 +196,8 @@ export declare function newQueryOrderBy(query: InternalQuery, fieldPath: Interna
|
|
|
196
196
|
* of the query or if any of the fields in the order by are an uncommitted
|
|
197
197
|
* server timestamp.
|
|
198
198
|
*/
|
|
199
|
-
export declare function newQueryBoundFromDocument(query: InternalQuery, databaseId: DatabaseId, methodName: string, doc: Document | null,
|
|
199
|
+
export declare function newQueryBoundFromDocument(query: InternalQuery, databaseId: DatabaseId, methodName: string, doc: Document | null, inclusive: boolean): Bound;
|
|
200
200
|
/**
|
|
201
201
|
* Converts a list of field values to a `Bound` for the given query.
|
|
202
202
|
*/
|
|
203
|
-
export declare function newQueryBoundFromFields(query: InternalQuery, databaseId: DatabaseId, dataReader: UserDataReader, methodName: string, values: unknown[],
|
|
203
|
+
export declare function newQueryBoundFromFields(query: InternalQuery, databaseId: DatabaseId, dataReader: UserDataReader, methodName: string, values: unknown[], inclusive: boolean): Bound;
|
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { BatchId, TargetId } from '../core/types';
|
|
18
|
+
import { IndexKind } from '../model/field_index';
|
|
18
19
|
import { ResourcePath } from '../model/path';
|
|
19
20
|
import { BundledQuery } from '../protos/firestore_bundle_proto';
|
|
20
21
|
import { Document as ProtoDocument, DocumentsTarget as ProtoDocumentsTarget, QueryTarget as ProtoQueryTarget, Write as ProtoWrite } from '../protos/firestore_proto_api';
|
|
21
22
|
import { EncodedResourcePath } from './encoded_resource_path';
|
|
23
|
+
export declare const INDEXING_SCHEMA_VERSION = 12;
|
|
22
24
|
/**
|
|
23
25
|
* Schema Version for the Web client:
|
|
24
26
|
* 1. Initial version including Mutation Queue, Query Cache, and Remote
|
|
@@ -37,8 +39,9 @@ import { EncodedResourcePath } from './encoded_resource_path';
|
|
|
37
39
|
* an auto-incrementing ID. This is required for Index-Free queries.
|
|
38
40
|
* 10. Rewrite the canonical IDs to the explicit Protobuf-based format.
|
|
39
41
|
* 11. Add bundles and named_queries for bundle support.
|
|
42
|
+
* 12. Add indexing support.
|
|
40
43
|
*/
|
|
41
|
-
export declare const SCHEMA_VERSION
|
|
44
|
+
export declare const SCHEMA_VERSION: number;
|
|
42
45
|
/**
|
|
43
46
|
* Wrapper class to store timestamps (seconds and nanos) in IndexedDb objects.
|
|
44
47
|
*/
|
|
@@ -763,9 +766,7 @@ export declare class DbClientMetadata {
|
|
|
763
766
|
/** Object keys in the 'clientMetadata' store are clientId strings. */
|
|
764
767
|
export declare type DbClientMetadataKey = string;
|
|
765
768
|
export declare type DbBundlesKey = string;
|
|
766
|
-
/**
|
|
767
|
-
* A object representing a bundle loaded by the SDK.
|
|
768
|
-
*/
|
|
769
|
+
/** An object representing a bundle loaded by the SDK. */
|
|
769
770
|
export declare class DbBundle {
|
|
770
771
|
/** The ID of the loaded bundle. */
|
|
771
772
|
bundleId: string;
|
|
@@ -785,9 +786,7 @@ export declare class DbBundle {
|
|
|
785
786
|
version: number);
|
|
786
787
|
}
|
|
787
788
|
export declare type DbNamedQueriesKey = string;
|
|
788
|
-
/**
|
|
789
|
-
* A object representing a named query loaded by the SDK via a bundle.
|
|
790
|
-
*/
|
|
789
|
+
/** An object representing a named query loaded by the SDK via a bundle. */
|
|
791
790
|
export declare class DbNamedQuery {
|
|
792
791
|
/** The name of the query. */
|
|
793
792
|
name: string;
|
|
@@ -806,12 +805,127 @@ export declare class DbNamedQuery {
|
|
|
806
805
|
/** The query saved in the bundle. */
|
|
807
806
|
bundledQuery: BundledQuery);
|
|
808
807
|
}
|
|
808
|
+
/** The key for each index consisting of just the index id. */
|
|
809
|
+
export declare type DbIndexConfigurationKey = number;
|
|
810
|
+
/** An object representing the global configuration for a field index. */
|
|
811
|
+
export declare class DbIndexConfiguration {
|
|
812
|
+
/** The index id for this entry. */
|
|
813
|
+
indexId: number;
|
|
814
|
+
/** The collection group this index belongs to. */
|
|
815
|
+
collectionGroup: string;
|
|
816
|
+
/** The fields to index for this index. */
|
|
817
|
+
fields: [[name: string, kind: IndexKind]];
|
|
818
|
+
/** Name of the IndexedDb object store. */
|
|
819
|
+
static store: string;
|
|
820
|
+
static keyPath: string;
|
|
821
|
+
constructor(
|
|
822
|
+
/** The index id for this entry. */
|
|
823
|
+
indexId: number,
|
|
824
|
+
/** The collection group this index belongs to. */
|
|
825
|
+
collectionGroup: string,
|
|
826
|
+
/** The fields to index for this index. */
|
|
827
|
+
fields: [[name: string, kind: IndexKind]]);
|
|
828
|
+
}
|
|
829
|
+
/** The key for each index state consisting of the index id and its user id. */
|
|
830
|
+
export declare type DbIndexStateKey = [number, string];
|
|
831
|
+
/**
|
|
832
|
+
* An object describing how up-to-date the index backfill is for each user and
|
|
833
|
+
* index.
|
|
834
|
+
*/
|
|
835
|
+
export declare class DbIndexState {
|
|
836
|
+
/** The index id for this entry. */
|
|
837
|
+
indexId: number;
|
|
838
|
+
/** The user id for this entry. */
|
|
839
|
+
uid: string;
|
|
840
|
+
/**
|
|
841
|
+
* A number that indicates when the index was last updated (relative to
|
|
842
|
+
* other indexes).
|
|
843
|
+
*/
|
|
844
|
+
sequenceNumber: number;
|
|
845
|
+
/**
|
|
846
|
+
* The latest read time that has been indexed by Firestore for this field
|
|
847
|
+
* index. Set to `{seconds: 0, nanos: 0}` if no documents have been indexed.
|
|
848
|
+
*/
|
|
849
|
+
readTime: DbTimestamp;
|
|
850
|
+
/**
|
|
851
|
+
* The last document that has been indexed for this field index. Empty if
|
|
852
|
+
* no documents have been indexed.
|
|
853
|
+
*/
|
|
854
|
+
documentKey: EncodedResourcePath;
|
|
855
|
+
/**
|
|
856
|
+
* The largest mutation batch id that has been processed for this index. -1
|
|
857
|
+
* if no mutations have been indexed.
|
|
858
|
+
*/
|
|
859
|
+
largestBatchId: number;
|
|
860
|
+
/** Name of the IndexedDb object store. */
|
|
861
|
+
static store: string;
|
|
862
|
+
static keyPath: string[];
|
|
863
|
+
constructor(
|
|
864
|
+
/** The index id for this entry. */
|
|
865
|
+
indexId: number,
|
|
866
|
+
/** The user id for this entry. */
|
|
867
|
+
uid: string,
|
|
868
|
+
/**
|
|
869
|
+
* A number that indicates when the index was last updated (relative to
|
|
870
|
+
* other indexes).
|
|
871
|
+
*/
|
|
872
|
+
sequenceNumber: number,
|
|
873
|
+
/**
|
|
874
|
+
* The latest read time that has been indexed by Firestore for this field
|
|
875
|
+
* index. Set to `{seconds: 0, nanos: 0}` if no documents have been indexed.
|
|
876
|
+
*/
|
|
877
|
+
readTime: DbTimestamp,
|
|
878
|
+
/**
|
|
879
|
+
* The last document that has been indexed for this field index. Empty if
|
|
880
|
+
* no documents have been indexed.
|
|
881
|
+
*/
|
|
882
|
+
documentKey: EncodedResourcePath,
|
|
883
|
+
/**
|
|
884
|
+
* The largest mutation batch id that has been processed for this index. -1
|
|
885
|
+
* if no mutations have been indexed.
|
|
886
|
+
*/
|
|
887
|
+
largestBatchId: number);
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* The key for each index entry consists of the index id and its user id,
|
|
891
|
+
* the encoded array and directional value for the indexed fields as well as
|
|
892
|
+
* the encoded document path for the indexed document.
|
|
893
|
+
*/
|
|
894
|
+
export declare type DbIndexEntryKey = [number, string, Uint8Array, Uint8Array, string];
|
|
895
|
+
/** An object that stores the encoded entries for all documents and fields. */
|
|
896
|
+
export declare class DbIndexEntries {
|
|
897
|
+
/** The index id for this entry. */
|
|
898
|
+
indexId: number;
|
|
899
|
+
/** The user id for this entry. */
|
|
900
|
+
uid: string;
|
|
901
|
+
/** The encoded array index value for this entry. */
|
|
902
|
+
arrayValue: Uint8Array;
|
|
903
|
+
/** The encoded directional value for equality and inequality filters. */
|
|
904
|
+
directionalValue: Uint8Array;
|
|
905
|
+
/** The document key this entry points to. */
|
|
906
|
+
documentKey: EncodedResourcePath;
|
|
907
|
+
/** Name of the IndexedDb object store. */
|
|
908
|
+
static store: string;
|
|
909
|
+
static keyPath: string[];
|
|
910
|
+
constructor(
|
|
911
|
+
/** The index id for this entry. */
|
|
912
|
+
indexId: number,
|
|
913
|
+
/** The user id for this entry. */
|
|
914
|
+
uid: string,
|
|
915
|
+
/** The encoded array index value for this entry. */
|
|
916
|
+
arrayValue: Uint8Array,
|
|
917
|
+
/** The encoded directional value for equality and inequality filters. */
|
|
918
|
+
directionalValue: Uint8Array,
|
|
919
|
+
/** The document key this entry points to. */
|
|
920
|
+
documentKey: EncodedResourcePath);
|
|
921
|
+
}
|
|
809
922
|
export declare const V1_STORES: string[];
|
|
810
923
|
export declare const V3_STORES: string[];
|
|
811
924
|
export declare const V4_STORES: string[];
|
|
812
925
|
export declare const V6_STORES: string[];
|
|
813
926
|
export declare const V8_STORES: string[];
|
|
814
927
|
export declare const V11_STORES: string[];
|
|
928
|
+
export declare const V12_STORES: string[];
|
|
815
929
|
/**
|
|
816
930
|
* The list of all default IndexedDB stores used throughout the SDK. This is
|
|
817
931
|
* used when creating transactions so that access across all stores is done
|
|
@@ -71,7 +71,7 @@ export declare function setMutation(keyStr: string, json: JsonObject<unknown>):
|
|
|
71
71
|
export declare function patchMutation(keyStr: string, json: JsonObject<unknown>, precondition?: Precondition): PatchMutation;
|
|
72
72
|
export declare function deleteMutation(keyStr: string): DeleteMutation;
|
|
73
73
|
export declare function mutationResult(testVersion: TestSnapshotVersion): MutationResult;
|
|
74
|
-
export declare function bound(values: unknown[],
|
|
74
|
+
export declare function bound(values: unknown[], inclusive: boolean): Bound;
|
|
75
75
|
export declare function query(resourcePath: string, ...constraints: Array<OrderBy | Filter>): Query;
|
|
76
76
|
export declare function targetData(targetId: TargetId, queryPurpose: TargetPurpose, path: string): TargetData;
|
|
77
77
|
export declare function noChangeEvent(targetId: number, snapshotVersion: number, resumeToken?: ByteString): RemoteEvent;
|