@firebase/firestore 3.8.3-canary.b5f86b1a3 → 3.8.3-canary.b970dc522

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.
Files changed (37) hide show
  1. package/dist/firestore/src/util/base64_decode_error.d.ts +22 -0
  2. package/dist/firestore/test/unit/specs/spec_builder.d.ts +7 -9
  3. package/dist/firestore/test/unit/specs/spec_test_runner.d.ts +3 -5
  4. package/dist/index.cjs.js +2203 -2173
  5. package/dist/index.cjs.js.map +1 -1
  6. package/dist/index.esm2017.js +2116 -2086
  7. package/dist/index.esm2017.js.map +1 -1
  8. package/dist/index.esm5.js +2081 -2048
  9. package/dist/index.esm5.js.map +1 -1
  10. package/dist/index.node.cjs.js +2 -2
  11. package/dist/index.node.mjs +2 -2
  12. package/dist/index.node.mjs.map +1 -1
  13. package/dist/index.rn.js +3028 -3000
  14. package/dist/index.rn.js.map +1 -1
  15. package/dist/lite/firestore/src/util/base64_decode_error.d.ts +22 -0
  16. package/dist/lite/firestore/test/unit/specs/spec_builder.d.ts +7 -9
  17. package/dist/lite/firestore/test/unit/specs/spec_test_runner.d.ts +3 -5
  18. package/dist/lite/index.browser.esm2017.js +704 -673
  19. package/dist/lite/index.browser.esm2017.js.map +1 -1
  20. package/dist/lite/index.browser.esm5.js +690 -642
  21. package/dist/lite/index.browser.esm5.js.map +1 -1
  22. package/dist/lite/index.cjs.js +704 -673
  23. package/dist/lite/index.cjs.js.map +1 -1
  24. package/dist/lite/index.node.cjs.js +2 -2
  25. package/dist/lite/index.node.mjs +2 -2
  26. package/dist/lite/index.node.mjs.map +1 -1
  27. package/dist/lite/index.rn.esm2017.js +1021 -993
  28. package/dist/lite/index.rn.esm2017.js.map +1 -1
  29. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +122 -122
  30. package/dist/lite/packages/firestore/src/util/base64_decode_error.d.ts +22 -0
  31. package/dist/lite/packages/firestore/test/unit/specs/spec_builder.d.ts +7 -9
  32. package/dist/lite/packages/firestore/test/unit/specs/spec_test_runner.d.ts +3 -5
  33. package/dist/packages/firestore/dist/index.esm2017.d.ts +158 -158
  34. package/dist/packages/firestore/src/util/base64_decode_error.d.ts +22 -0
  35. package/dist/packages/firestore/test/unit/specs/spec_builder.d.ts +7 -9
  36. package/dist/packages/firestore/test/unit/specs/spec_test_runner.d.ts +3 -5
  37. package/package.json +9 -9
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * An error encountered while decoding base64 string.
19
+ */
20
+ export declare class Base64DecodeError extends Error {
21
+ readonly name = "Base64DecodeError";
22
+ }
@@ -40,6 +40,10 @@ export interface ActiveTargetSpec {
40
40
  export interface ActiveTargetMap {
41
41
  [targetId: string]: ActiveTargetSpec;
42
42
  }
43
+ export interface ResumeSpec {
44
+ resumeToken?: string;
45
+ readTime?: TestSnapshotVersion;
46
+ }
43
47
  /**
44
48
  * Tracks the expected memory state of a client (e.g. the expected active watch
45
49
  * targets based on userListens(), userUnlistens(), and watchRemoves()
@@ -99,10 +103,7 @@ export declare class SpecBuilder {
99
103
  runAsTest(name: string, tags: string[], usePersistence: boolean): Promise<void>;
100
104
  withGCEnabled(gcEnabled: boolean): this;
101
105
  withMaxConcurrentLimboResolutions(value?: number): this;
102
- userListens(query: Query, resume?: {
103
- resumeToken?: string;
104
- readTime?: TestSnapshotVersion;
105
- }): this;
106
+ userListens(query: Query, resume?: ResumeSpec): this;
106
107
  /**
107
108
  * Registers a previously active target with the test expectations after a
108
109
  * stream disconnect.
@@ -189,7 +190,7 @@ export declare class SpecBuilder {
189
190
  removed?: Query[];
190
191
  }, ...docs: Document[]): this;
191
192
  watchRemovesDoc(key: DocumentKey, ...targets: Query[]): this;
192
- watchFilters(queries: Query[], ...docs: DocumentKey[]): this;
193
+ watchFilters(queries: Query[], docs?: DocumentKey[]): this;
193
194
  watchResets(...queries: Query[]): this;
194
195
  watchSnapshots(version: TestSnapshotVersion, targets?: Query[], resumeToken?: string): this;
195
196
  watchAcksFull(query: Query, version: TestSnapshotVersion, ...docs: Document[]): this;
@@ -211,10 +212,7 @@ export declare class SpecBuilder {
211
212
  errorCode?: Code;
212
213
  }): this;
213
214
  /** Registers a query that is active in another tab. */
214
- expectListen(query: Query, resume?: {
215
- resumeToken?: string;
216
- readTime?: TestSnapshotVersion;
217
- }): this;
215
+ expectListen(query: Query, resume?: ResumeSpec): this;
218
216
  /** Removes a query that is no longer active in any tab. */
219
217
  expectUnlisten(query: Query): this;
220
218
  /**
@@ -223,13 +223,11 @@ export interface SpecClientState {
223
223
  primary?: true;
224
224
  }
225
225
  /**
226
- * [[<target-id>, ...], <key>, ...]
227
- * Note that the last parameter is really of type ...string (spread operator)
228
226
  * The filter is based of a list of keys to match in the existence filter
229
227
  */
230
- export interface SpecWatchFilter extends Array<TargetId[] | string | undefined> {
231
- '0': TargetId[];
232
- '1': string | undefined;
228
+ export interface SpecWatchFilter {
229
+ targetIds: TargetId[];
230
+ keys: string[];
233
231
  }
234
232
  export declare type SpecLimitType = 'LimitToFirst' | 'LimitToLast';
235
233
  /**