@firebase/firestore 3.4.13 → 3.4.14-canary.6f4ba2525
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 +8 -0
- package/dist/firestore/src/api/credentials.d.ts +13 -3
- package/dist/firestore/src/api/index_configuration.d.ts +7 -8
- package/dist/firestore/src/api.d.ts +1 -1
- package/dist/firestore/src/local/indexeddb_schema.d.ts +1 -3
- package/dist/firestore/src/local/local_store_impl.d.ts +2 -0
- package/dist/firestore/src/util/array.d.ts +18 -0
- package/dist/firestore/test/unit/local/counting_query_engine.d.ts +11 -0
- package/dist/firestore/test/unit/local/local_store_indexeddb.test.d.ts +17 -0
- package/dist/firestore/test/unit/specs/index_spec.test.d.ts +17 -0
- package/dist/firestore/test/unit/specs/spec_builder.d.ts +5 -0
- package/dist/firestore/test/unit/specs/spec_test_runner.d.ts +8 -0
- package/dist/firestore/test/unit/util/array.test.d.ts +17 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm2017.js +3737 -3589
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +3721 -3604
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +250 -53
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +250 -53
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +3676 -3529
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +13 -13
- package/dist/lite/firestore/src/api/credentials.d.ts +13 -3
- package/dist/lite/firestore/src/api/index_configuration.d.ts +7 -8
- package/dist/lite/firestore/src/api.d.ts +1 -1
- package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +1 -3
- package/dist/lite/firestore/src/local/local_store_impl.d.ts +2 -0
- package/dist/lite/firestore/src/util/array.d.ts +18 -0
- package/dist/lite/firestore/test/unit/local/counting_query_engine.d.ts +11 -0
- package/dist/lite/firestore/test/unit/local/local_store_indexeddb.test.d.ts +17 -0
- package/dist/lite/firestore/test/unit/specs/index_spec.test.d.ts +17 -0
- package/dist/lite/firestore/test/unit/specs/spec_builder.d.ts +5 -0
- package/dist/lite/firestore/test/unit/specs/spec_test_runner.d.ts +8 -0
- package/dist/lite/firestore/test/unit/util/array.test.d.ts +17 -0
- package/dist/lite/index.browser.esm2017.js +232 -222
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +485 -469
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +36 -18
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +36 -18
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +232 -222
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +3 -0
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +23 -23
- package/dist/lite/packages/firestore/src/api/credentials.d.ts +13 -3
- package/dist/lite/packages/firestore/src/api/index_configuration.d.ts +7 -8
- package/dist/lite/packages/firestore/src/api.d.ts +1 -1
- package/dist/lite/packages/firestore/src/local/indexeddb_schema.d.ts +1 -3
- package/dist/lite/packages/firestore/src/local/local_store_impl.d.ts +2 -0
- package/dist/lite/packages/firestore/src/util/array.d.ts +18 -0
- package/dist/lite/packages/firestore/test/unit/local/counting_query_engine.d.ts +11 -0
- package/dist/lite/packages/firestore/test/unit/local/local_store_indexeddb.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/unit/specs/index_spec.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/unit/specs/spec_builder.d.ts +5 -0
- package/dist/lite/packages/firestore/test/unit/specs/spec_test_runner.d.ts +8 -0
- package/dist/lite/packages/firestore/test/unit/util/array.test.d.ts +17 -0
- package/dist/lite/private.d.ts +3 -0
- package/dist/packages/firestore/dist/index.esm2017.d.ts +193 -193
- package/dist/packages/firestore/src/api/credentials.d.ts +13 -3
- package/dist/packages/firestore/src/api/index_configuration.d.ts +7 -8
- package/dist/packages/firestore/src/api.d.ts +1 -1
- package/dist/packages/firestore/src/local/indexeddb_schema.d.ts +1 -3
- package/dist/packages/firestore/src/local/local_store_impl.d.ts +2 -0
- package/dist/packages/firestore/src/util/array.d.ts +18 -0
- package/dist/packages/firestore/test/unit/local/counting_query_engine.d.ts +11 -0
- package/dist/packages/firestore/test/unit/local/local_store_indexeddb.test.d.ts +17 -0
- package/dist/packages/firestore/test/unit/specs/index_spec.test.d.ts +17 -0
- package/dist/packages/firestore/test/unit/specs/spec_builder.d.ts +5 -0
- package/dist/packages/firestore/test/unit/specs/spec_test_runner.d.ts +8 -0
- package/dist/packages/firestore/test/unit/util/array.test.d.ts +17 -0
- package/dist/private.d.ts +4 -1
- package/package.json +10 -9
package/dist/lite/internal.d.ts
CHANGED
|
@@ -140,6 +140,8 @@ declare interface AsyncQueue {
|
|
|
140
140
|
verifyOperationInProgress(): void;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
declare type AuthTokenFactory = () => string;
|
|
144
|
+
|
|
143
145
|
/**
|
|
144
146
|
* Path represents an ordered sequence of string segments.
|
|
145
147
|
*/
|
|
@@ -1460,6 +1462,7 @@ declare interface FirstPartyCredentialsSettings {
|
|
|
1460
1462
|
['client']: unknown;
|
|
1461
1463
|
['sessionIndex']: string;
|
|
1462
1464
|
['iamToken']: string | null;
|
|
1465
|
+
['authTokenFactory']: AuthTokenFactory | null;
|
|
1463
1466
|
}
|
|
1464
1467
|
|
|
1465
1468
|
/**
|
|
@@ -978,18 +978,18 @@ import { FirebaseError as c } from "@firebase/util/dist/src/errors";
|
|
|
978
978
|
constructor(t: any, e: any, n: any);
|
|
979
979
|
databaseId: any;
|
|
980
980
|
ignoreUndefinedProperties: any;
|
|
981
|
-
|
|
982
|
-
/** Creates a new top-level parse context. */
|
|
981
|
+
C: any;
|
|
982
|
+
/** Creates a new top-level parse context. */ dt(t: any, e: any, n: any, r?: boolean): $n;
|
|
983
983
|
}
|
|
984
984
|
declare class Ln extends An {
|
|
985
985
|
constructor(t: any, e: any);
|
|
986
|
-
|
|
986
|
+
wt: any;
|
|
987
987
|
_toFieldTransform(t: any): Ae;
|
|
988
988
|
isEqual(t: any): boolean;
|
|
989
989
|
}
|
|
990
990
|
declare class Cn extends An {
|
|
991
991
|
constructor(t: any, e: any);
|
|
992
|
-
|
|
992
|
+
wt: any;
|
|
993
993
|
_toFieldTransform(t: any): Ae;
|
|
994
994
|
isEqual(t: any): boolean;
|
|
995
995
|
}
|
|
@@ -1000,27 +1000,27 @@ declare class qn extends An {
|
|
|
1000
1000
|
declare class pr extends sr {
|
|
1001
1001
|
constructor(t: any, e: any, n: any);
|
|
1002
1002
|
type: any;
|
|
1003
|
-
|
|
1004
|
-
|
|
1003
|
+
It: any;
|
|
1004
|
+
At: any;
|
|
1005
1005
|
_apply(t: any): mn;
|
|
1006
1006
|
}
|
|
1007
1007
|
declare class Mn extends An {
|
|
1008
1008
|
constructor(t: any, e: any);
|
|
1009
|
-
|
|
1009
|
+
yt: any;
|
|
1010
1010
|
_toFieldTransform(t: any): Ae;
|
|
1011
1011
|
isEqual(t: any): boolean;
|
|
1012
1012
|
}
|
|
1013
1013
|
declare class hr extends sr {
|
|
1014
1014
|
constructor(t: any, e: any, n: any);
|
|
1015
1015
|
type: any;
|
|
1016
|
-
|
|
1017
|
-
|
|
1016
|
+
Et: any;
|
|
1017
|
+
Tt: any;
|
|
1018
1018
|
_apply(t: any): mn;
|
|
1019
1019
|
}
|
|
1020
1020
|
declare class cr extends sr {
|
|
1021
1021
|
constructor(t: any, e: any);
|
|
1022
|
-
dt: any;
|
|
1023
1022
|
_t: any;
|
|
1023
|
+
bt: any;
|
|
1024
1024
|
type: string;
|
|
1025
1025
|
_apply(t: any): mn;
|
|
1026
1026
|
}
|
|
@@ -1031,15 +1031,15 @@ declare class kn extends An {
|
|
|
1031
1031
|
declare class dr extends sr {
|
|
1032
1032
|
constructor(t: any, e: any, n: any);
|
|
1033
1033
|
type: any;
|
|
1034
|
-
|
|
1035
|
-
|
|
1034
|
+
It: any;
|
|
1035
|
+
At: any;
|
|
1036
1036
|
_apply(t: any): mn;
|
|
1037
1037
|
}
|
|
1038
1038
|
declare class or extends sr {
|
|
1039
1039
|
constructor(t: any, e: any, n: any);
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1040
|
+
_t: any;
|
|
1041
|
+
gt: any;
|
|
1042
|
+
vt: any;
|
|
1043
1043
|
type: string;
|
|
1044
1044
|
_apply(t: any): mn;
|
|
1045
1045
|
}
|
|
@@ -1105,20 +1105,20 @@ declare class J {
|
|
|
1105
1105
|
constructor(t: any, e: any, n: any, r: any, s: any, i: any);
|
|
1106
1106
|
settings: any;
|
|
1107
1107
|
databaseId: any;
|
|
1108
|
-
|
|
1108
|
+
C: any;
|
|
1109
1109
|
ignoreUndefinedProperties: any;
|
|
1110
1110
|
fieldTransforms: any;
|
|
1111
1111
|
fieldMask: any;
|
|
1112
1112
|
get path(): any;
|
|
1113
|
-
get
|
|
1114
|
-
/** Returns a new context with the specified settings overwritten. */
|
|
1115
|
-
nt(t: any): $n;
|
|
1113
|
+
get rt(): any;
|
|
1114
|
+
/** Returns a new context with the specified settings overwritten. */ st(t: any): $n;
|
|
1116
1115
|
it(t: any): $n;
|
|
1117
|
-
|
|
1118
|
-
|
|
1116
|
+
ct(t: any): $n;
|
|
1117
|
+
at(t: any): $n;
|
|
1118
|
+
ht(t: any): L;
|
|
1119
1119
|
/** Returns 'true' if 'fieldPath' was traversed when creating this context. */ contains(t: any): boolean;
|
|
1120
|
-
|
|
1121
|
-
|
|
1120
|
+
nt(): void;
|
|
1121
|
+
ut(t: any): void;
|
|
1122
1122
|
}
|
|
1123
1123
|
/**
|
|
1124
1124
|
* @license
|
|
@@ -19,11 +19,13 @@ import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
|
19
19
|
import { Provider } from '@firebase/component';
|
|
20
20
|
import { User } from '../auth/user';
|
|
21
21
|
import { AsyncQueue } from '../util/async_queue';
|
|
22
|
+
export declare type AuthTokenFactory = () => string;
|
|
22
23
|
export interface FirstPartyCredentialsSettings {
|
|
23
24
|
['type']: 'gapi';
|
|
24
25
|
['client']: unknown;
|
|
25
26
|
['sessionIndex']: string;
|
|
26
27
|
['iamToken']: string | null;
|
|
28
|
+
['authTokenFactory']: AuthTokenFactory | null;
|
|
27
29
|
}
|
|
28
30
|
export interface ProviderCredentialsSettings {
|
|
29
31
|
['type']: 'provider';
|
|
@@ -146,16 +148,24 @@ interface Gapi {
|
|
|
146
148
|
};
|
|
147
149
|
}
|
|
148
150
|
export declare class FirstPartyToken implements Token {
|
|
151
|
+
private readonly gapi;
|
|
152
|
+
private readonly sessionIndex;
|
|
153
|
+
private readonly iamToken;
|
|
154
|
+
private readonly authTokenFactory;
|
|
149
155
|
type: TokenType;
|
|
150
156
|
user: User;
|
|
151
|
-
|
|
152
|
-
constructor(gapi: Gapi, sessionIndex: string, iamToken: string | null);
|
|
157
|
+
private _headers;
|
|
158
|
+
constructor(gapi: Gapi | null, sessionIndex: string, iamToken: string | null, authTokenFactory: AuthTokenFactory | null);
|
|
159
|
+
/** Gets an authorization token, using a provided factory function, or falling back to First Party GAPI. */
|
|
160
|
+
private getAuthToken;
|
|
161
|
+
get headers(): Map<string, string>;
|
|
153
162
|
}
|
|
154
163
|
export declare class FirstPartyAuthCredentialsProvider implements CredentialsProvider<User> {
|
|
155
164
|
private gapi;
|
|
156
165
|
private sessionIndex;
|
|
157
166
|
private iamToken;
|
|
158
|
-
|
|
167
|
+
private authTokenFactory;
|
|
168
|
+
constructor(gapi: Gapi | null, sessionIndex: string, iamToken: string | null, authTokenFactory: AuthTokenFactory | null);
|
|
159
169
|
getToken(): Promise<Token | null>;
|
|
160
170
|
start(asyncQueue: AsyncQueue, changeListener: CredentialChangeListener<User>): void;
|
|
161
171
|
shutdown(): void;
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { FieldIndex } from '../model/field_index';
|
|
17
18
|
import { Firestore } from './database';
|
|
18
19
|
export { connectFirestoreEmulator, EmulatorMockTokenOptions } from '../lite-api/database';
|
|
19
20
|
/**
|
|
20
21
|
* A single field element in an index configuration.
|
|
21
|
-
*
|
|
22
|
-
* @internal
|
|
22
|
+
* @beta
|
|
23
23
|
*/
|
|
24
24
|
export interface IndexField {
|
|
25
25
|
/** The field path to index. */
|
|
@@ -42,8 +42,7 @@ export interface IndexField {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* The SDK definition of a Firestore index.
|
|
45
|
-
*
|
|
46
|
-
* @internal
|
|
45
|
+
* @beta
|
|
47
46
|
*/
|
|
48
47
|
export interface Index {
|
|
49
48
|
/** The ID of the collection to index. */
|
|
@@ -57,8 +56,7 @@ export interface Index {
|
|
|
57
56
|
*
|
|
58
57
|
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
59
58
|
* for a description of the format of the index definition.
|
|
60
|
-
*
|
|
61
|
-
* @internal
|
|
59
|
+
* @beta
|
|
62
60
|
*/
|
|
63
61
|
export interface IndexConfiguration {
|
|
64
62
|
/** A list of all Firestore indexes. */
|
|
@@ -80,12 +78,12 @@ export interface IndexConfiguration {
|
|
|
80
78
|
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
81
79
|
* index configuration is ignored.
|
|
82
80
|
*
|
|
83
|
-
* @internal
|
|
84
81
|
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
85
82
|
* @param configuration -The index definition.
|
|
86
83
|
* @throws FirestoreError if the JSON format is invalid.
|
|
87
84
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
88
85
|
* configured.
|
|
86
|
+
* @beta
|
|
89
87
|
*/
|
|
90
88
|
export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
91
89
|
/**
|
|
@@ -107,11 +105,12 @@ export declare function setIndexConfiguration(firestore: Firestore, configuratio
|
|
|
107
105
|
* firestore:indexes`). If the JSON format is invalid, this method throws an
|
|
108
106
|
* error.
|
|
109
107
|
*
|
|
110
|
-
* @internal
|
|
111
108
|
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
112
109
|
* @param json -The JSON format exported by the Firebase CLI.
|
|
113
110
|
* @throws FirestoreError if the JSON format is invalid.
|
|
114
111
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
115
112
|
* configured.
|
|
113
|
+
* @beta
|
|
116
114
|
*/
|
|
117
115
|
export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
116
|
+
export declare function parseIndexes(jsonOrConfiguration: string | IndexConfiguration): FieldIndex[];
|
|
@@ -36,6 +36,7 @@ export { CACHE_SIZE_UNLIMITED } from './api/database';
|
|
|
36
36
|
export { FirestoreErrorCode, FirestoreError } from './util/error';
|
|
37
37
|
export { AbstractUserDataWriter } from './lite-api/user_data_writer';
|
|
38
38
|
export { Primitive, NestedUpdateFields, ChildUpdateFields, AddPrefixToKeys, UnionToIntersection } from '../src/lite-api/types';
|
|
39
|
+
export { setIndexConfiguration, Index, IndexConfiguration, IndexField } from './api/index_configuration';
|
|
39
40
|
/**
|
|
40
41
|
* Internal exports
|
|
41
42
|
*/
|
|
@@ -50,4 +51,3 @@ export type { ByteString as _ByteString } from './util/byte_string';
|
|
|
50
51
|
export { logWarn as _logWarn } from './util/log';
|
|
51
52
|
export { EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider } from './api/credentials';
|
|
52
53
|
export { EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider } from './api/credentials';
|
|
53
|
-
export { setIndexConfiguration as _setIndexConfiguration } from './api/index_configuration';
|
|
@@ -20,8 +20,6 @@ import { BundledQuery } from '../protos/firestore_bundle_proto';
|
|
|
20
20
|
import { Document as ProtoDocument, DocumentsTarget as ProtoDocumentsTarget, QueryTarget as ProtoQueryTarget, Write as ProtoWrite } from '../protos/firestore_proto_api';
|
|
21
21
|
import { EncodedResourcePath } from './encoded_resource_path';
|
|
22
22
|
import { DbTimestampKey } from './indexeddb_sentinels';
|
|
23
|
-
export declare const INDEXING_ENABLED = false;
|
|
24
|
-
export declare const INDEXING_SCHEMA_VERSION = 15;
|
|
25
23
|
/**
|
|
26
24
|
* Schema Version for the Web client:
|
|
27
25
|
* 1. Initial version including Mutation Queue, Query Cache, and Remote
|
|
@@ -46,7 +44,7 @@ export declare const INDEXING_SCHEMA_VERSION = 15;
|
|
|
46
44
|
* 14. Add overlays.
|
|
47
45
|
* 15. Add indexing support.
|
|
48
46
|
*/
|
|
49
|
-
export declare const SCHEMA_VERSION
|
|
47
|
+
export declare const SCHEMA_VERSION = 15;
|
|
50
48
|
/**
|
|
51
49
|
* Wrapper class to store timestamps (seconds and nanos) in IndexedDb objects.
|
|
52
50
|
*/
|
|
@@ -23,6 +23,7 @@ import { BatchId, TargetId } from '../core/types';
|
|
|
23
23
|
import { DocumentKeySet, DocumentMap } from '../model/collections';
|
|
24
24
|
import { Document } from '../model/document';
|
|
25
25
|
import { DocumentKey } from '../model/document_key';
|
|
26
|
+
import { FieldIndex } from '../model/field_index';
|
|
26
27
|
import { Mutation } from '../model/mutation';
|
|
27
28
|
import { MutationBatch, MutationBatchResult } from '../model/mutation_batch';
|
|
28
29
|
import { BundleMetadata, NamedQuery as ProtoNamedQuery } from '../protos/firestore_bundle_proto';
|
|
@@ -192,3 +193,4 @@ export declare function localStoreGetNamedQuery(localStore: LocalStore, queryNam
|
|
|
192
193
|
* Saves the given `NamedQuery` to local persistence.
|
|
193
194
|
*/
|
|
194
195
|
export declare function localStoreSaveNamedQuery(localStore: LocalStore, query: ProtoNamedQuery, documents?: DocumentKeySet): Promise<void>;
|
|
196
|
+
export declare function localStoreConfigureFieldIndexes(localStore: LocalStore, newFieldIndexes: FieldIndex[]): Promise<void>;
|
|
@@ -28,3 +28,21 @@ export declare function some<T>(array: T[], predicate: (t: T) => boolean): boole
|
|
|
28
28
|
* predicate does not return true for any item, null is returned.
|
|
29
29
|
*/
|
|
30
30
|
export declare function findIndex<A>(array: A[], predicate: (value: A) => boolean): number | null;
|
|
31
|
+
/**
|
|
32
|
+
* Compares two array for equality using comparator. The method computes the
|
|
33
|
+
* intersection and invokes `onAdd` for every element that is in `after` but not
|
|
34
|
+
* `before`. `onRemove` is invoked for every element in `before` but missing
|
|
35
|
+
* from `after`.
|
|
36
|
+
*
|
|
37
|
+
* The method creates a copy of both `before` and `after` and runs in O(n log
|
|
38
|
+
* n), where n is the size of the two lists.
|
|
39
|
+
*
|
|
40
|
+
* @param before - The elements that exist in the original array.
|
|
41
|
+
* @param after - The elements to diff against the original array.
|
|
42
|
+
* @param comparator - The comparator for the elements in before and after.
|
|
43
|
+
* @param onAdd - A function to invoke for every element that is part of `
|
|
44
|
+
* after` but not `before`.
|
|
45
|
+
* @param onRemove - A function to invoke for every element that is part of
|
|
46
|
+
* `before` but not `after`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function diffArrays<T>(before: T[], after: T[], comparator: (l: T, r: T) => number, onAdd: (entry: T) => void, onRemove: (entry: T) => void): void;
|
|
@@ -50,9 +50,20 @@ export declare class CountingQueryEngine extends QueryEngine {
|
|
|
50
50
|
* and `getEntries()` APIs (since the last call to `resetCounts()`)
|
|
51
51
|
*/
|
|
52
52
|
documentsReadByKey: number;
|
|
53
|
+
/**
|
|
54
|
+
* The number of documents returned by the OverlayCache's `getOverlays()`
|
|
55
|
+
* API (since the last call to `resetCounts()`)
|
|
56
|
+
*/
|
|
57
|
+
overlaysReadByCollection: number;
|
|
58
|
+
/**
|
|
59
|
+
* The number of documents returned by the OverlayCache's `getOverlay()`
|
|
60
|
+
* APIs (since the last call to `resetCounts()`)
|
|
61
|
+
*/
|
|
62
|
+
overlaysReadByKey: number;
|
|
53
63
|
resetCounts(): void;
|
|
54
64
|
getDocumentsMatchingQuery(transaction: PersistenceTransaction, query: Query, lastLimboFreeSnapshotVersion: SnapshotVersion, remoteKeys: DocumentKeySet): PersistencePromise<DocumentMap>;
|
|
55
65
|
initialize(localDocuments: LocalDocumentsView, indexManager: IndexManager): void;
|
|
56
66
|
private wrapRemoteDocumentCache;
|
|
57
67
|
private wrapMutationQueue;
|
|
68
|
+
private wrapDocumentOverlayCache;
|
|
58
69
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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
|
+
export {};
|
|
@@ -14,12 +14,14 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { IndexConfiguration } from '../../../src/api/index_configuration';
|
|
17
18
|
import { Query } from '../../../src/core/query';
|
|
18
19
|
import { Target } from '../../../src/core/target';
|
|
19
20
|
import { TargetIdGenerator } from '../../../src/core/target_id_generator';
|
|
20
21
|
import { TargetId } from '../../../src/core/types';
|
|
21
22
|
import { Document } from '../../../src/model/document';
|
|
22
23
|
import { DocumentKey } from '../../../src/model/document_key';
|
|
24
|
+
import { FieldIndex } from '../../../src/model/field_index';
|
|
23
25
|
import { JsonObject } from '../../../src/model/object_value';
|
|
24
26
|
import { TimerId } from '../../../src/util/async_queue';
|
|
25
27
|
import { Code } from '../../../src/util/error';
|
|
@@ -113,6 +115,7 @@ export declare class SpecBuilder {
|
|
|
113
115
|
userAddsSnapshotsInSyncListener(): this;
|
|
114
116
|
userRemovesSnapshotsInSyncListener(): this;
|
|
115
117
|
loadBundle(bundleContent: string): this;
|
|
118
|
+
setIndexConfiguration(jsonOrConfiguration: string | IndexConfiguration): this;
|
|
116
119
|
becomeHidden(): this;
|
|
117
120
|
becomeVisible(): this;
|
|
118
121
|
runTimer(timerId: TimerId): this;
|
|
@@ -130,6 +133,8 @@ export declare class SpecBuilder {
|
|
|
130
133
|
/** Stops failing database operations. */
|
|
131
134
|
recoverDatabase(): this;
|
|
132
135
|
expectIsShutdown(): this;
|
|
136
|
+
/** Expects indexes to exist (in any order) */
|
|
137
|
+
expectIndexes(indexes: FieldIndex[]): this;
|
|
133
138
|
/** Overrides the currently expected set of active targets. */
|
|
134
139
|
expectActiveTargets(...targets: Array<{
|
|
135
140
|
query: Query;
|
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { IndexConfiguration } from '../../../src/api/index_configuration';
|
|
17
18
|
import { Query } from '../../../src/core/query';
|
|
18
19
|
import { TargetId } from '../../../src/core/types';
|
|
20
|
+
import { FieldIndex } from '../../../src/model/field_index';
|
|
19
21
|
import { JsonObject } from '../../../src/model/object_value';
|
|
20
22
|
import { TestSnapshotVersion } from '../../util/helpers';
|
|
21
23
|
import { ActiveTargetMap } from './spec_builder';
|
|
@@ -95,6 +97,10 @@ export interface SpecStep {
|
|
|
95
97
|
waitForPendingWrites?: true;
|
|
96
98
|
/** Fails the listed database actions. */
|
|
97
99
|
failDatabase?: false | PersistenceAction[];
|
|
100
|
+
/**
|
|
101
|
+
* Set Index Configuration
|
|
102
|
+
*/
|
|
103
|
+
setIndexConfiguration?: string | IndexConfiguration;
|
|
98
104
|
/**
|
|
99
105
|
* Run a queued timer task (without waiting for the delay to expire). See
|
|
100
106
|
* TimerId enum definition for possible values).
|
|
@@ -306,5 +312,7 @@ export interface StateExpectation {
|
|
|
306
312
|
acknowledgedDocs: string[];
|
|
307
313
|
rejectedDocs: string[];
|
|
308
314
|
};
|
|
315
|
+
/** Indexes */
|
|
316
|
+
indexes?: FieldIndex[];
|
|
309
317
|
}
|
|
310
318
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 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
|
+
export {};
|
package/dist/lite/private.d.ts
CHANGED
|
@@ -123,6 +123,8 @@ declare interface AsyncQueue {
|
|
|
123
123
|
verifyOperationInProgress(): void;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
declare type AuthTokenFactory = () => string;
|
|
127
|
+
|
|
126
128
|
/**
|
|
127
129
|
* Path represents an ordered sequence of string segments.
|
|
128
130
|
*/
|
|
@@ -1337,6 +1339,7 @@ declare interface FirstPartyCredentialsSettings {
|
|
|
1337
1339
|
['client']: unknown;
|
|
1338
1340
|
['sessionIndex']: string;
|
|
1339
1341
|
['iamToken']: string | null;
|
|
1342
|
+
['authTokenFactory']: AuthTokenFactory | null;
|
|
1340
1343
|
}
|
|
1341
1344
|
|
|
1342
1345
|
/**
|