@firebase/firestore 3.4.2 → 3.4.3

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 (170) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/firestore/src/api/snapshot.d.ts +6 -6
  3. package/dist/firestore/src/lite-api/snapshot.d.ts +2 -2
  4. package/dist/firestore/test/integration/bootstrap.d.ts +0 -1
  5. package/dist/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  6. package/dist/firestore/test/integration/util/firebase_export.d.ts +6 -14
  7. package/dist/firestore/test/integration/util/helpers.d.ts +18 -18
  8. package/dist/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  9. package/dist/firestore/test/integration/util/settings.d.ts +2 -2
  10. package/dist/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  11. package/dist/firestore/test/util/api_helpers.d.ts +1 -1
  12. package/dist/firestore/test/util/helpers.d.ts +4 -6
  13. package/dist/index.d.ts +6 -6
  14. package/dist/index.esm2017.js +869 -869
  15. package/dist/index.esm2017.js.map +1 -1
  16. package/dist/index.esm5.js +1257 -1257
  17. package/dist/index.esm5.js.map +1 -1
  18. package/dist/index.node.cjs.js +2674 -24
  19. package/dist/index.node.cjs.js.map +1 -1
  20. package/dist/index.node.mjs +2675 -25
  21. package/dist/index.node.mjs.map +1 -1
  22. package/dist/index.rn.js +1068 -1068
  23. package/dist/index.rn.js.map +1 -1
  24. package/dist/internal.d.ts +8 -8
  25. package/dist/lite/firestore/src/api/snapshot.d.ts +6 -6
  26. package/dist/lite/firestore/src/lite-api/snapshot.d.ts +2 -2
  27. package/dist/lite/firestore/test/integration/bootstrap.d.ts +0 -1
  28. package/dist/lite/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  29. package/dist/lite/firestore/test/integration/util/firebase_export.d.ts +6 -14
  30. package/dist/lite/firestore/test/integration/util/helpers.d.ts +18 -18
  31. package/dist/lite/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  32. package/dist/lite/firestore/test/integration/util/settings.d.ts +2 -2
  33. package/dist/lite/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  34. package/dist/lite/firestore/test/util/api_helpers.d.ts +1 -1
  35. package/dist/lite/firestore/test/util/helpers.d.ts +4 -6
  36. package/dist/lite/index.browser.esm2017.js +1136 -1136
  37. package/dist/lite/index.browser.esm2017.js.map +1 -1
  38. package/dist/lite/index.browser.esm5.js +105 -105
  39. package/dist/lite/index.browser.esm5.js.map +1 -1
  40. package/dist/lite/index.d.ts +2 -2
  41. package/dist/lite/index.node.cjs.js +11 -12
  42. package/dist/lite/index.node.cjs.js.map +1 -1
  43. package/dist/lite/index.node.mjs +11 -12
  44. package/dist/lite/index.node.mjs.map +1 -1
  45. package/dist/lite/index.rn.esm2017.js +148 -148
  46. package/dist/lite/index.rn.esm2017.js.map +1 -1
  47. package/dist/lite/internal.d.ts +2 -2
  48. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +107 -107
  49. package/dist/lite/packages/firestore/src/api/snapshot.d.ts +6 -6
  50. package/dist/lite/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
  51. package/dist/lite/packages/firestore/test/integration/bootstrap.d.ts +0 -1
  52. package/dist/lite/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  53. package/dist/lite/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
  54. package/dist/lite/packages/firestore/test/integration/util/helpers.d.ts +18 -18
  55. package/dist/lite/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  56. package/dist/lite/packages/firestore/test/integration/util/settings.d.ts +2 -2
  57. package/dist/lite/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  58. package/dist/lite/packages/firestore/test/util/api_helpers.d.ts +1 -1
  59. package/dist/lite/packages/firestore/test/util/helpers.d.ts +4 -6
  60. package/dist/lite/private.d.ts +2 -2
  61. package/dist/packages/firestore/dist/index.esm2017.d.ts +105 -105
  62. package/dist/packages/firestore/src/api/snapshot.d.ts +6 -6
  63. package/dist/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
  64. package/dist/packages/firestore/test/integration/bootstrap.d.ts +0 -1
  65. package/dist/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  66. package/dist/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
  67. package/dist/packages/firestore/test/integration/util/helpers.d.ts +18 -18
  68. package/dist/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  69. package/dist/packages/firestore/test/integration/util/settings.d.ts +2 -2
  70. package/dist/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  71. package/dist/packages/firestore/test/util/api_helpers.d.ts +1 -1
  72. package/dist/packages/firestore/test/util/helpers.d.ts +4 -6
  73. package/dist/private.d.ts +8 -8
  74. package/package.json +4 -7
  75. package/dist/firestore/compat/api/blob.d.ts +0 -29
  76. package/dist/firestore/compat/api/database.d.ts +0 -228
  77. package/dist/firestore/compat/api/field_path.d.ts +0 -36
  78. package/dist/firestore/compat/api/field_value.d.ts +0 -29
  79. package/dist/firestore/compat/api/geo_point.d.ts +0 -17
  80. package/dist/firestore/compat/api/observer.d.ts +0 -29
  81. package/dist/firestore/compat/api/timestamp.d.ts +0 -17
  82. package/dist/firestore/compat/config.d.ts +0 -28
  83. package/dist/firestore/compat/index.console.d.ts +0 -42
  84. package/dist/firestore/compat/index.d.ts +0 -49
  85. package/dist/firestore/compat/index.node.d.ts +0 -22
  86. package/dist/firestore/compat/index.rn.d.ts +0 -22
  87. package/dist/firestore/compat/register-module.d.ts +0 -42
  88. package/dist/firestore/compat/util/input_validation.d.ts +0 -18
  89. package/dist/lite/firestore/compat/api/blob.d.ts +0 -29
  90. package/dist/lite/firestore/compat/api/database.d.ts +0 -228
  91. package/dist/lite/firestore/compat/api/field_path.d.ts +0 -36
  92. package/dist/lite/firestore/compat/api/field_value.d.ts +0 -29
  93. package/dist/lite/firestore/compat/api/geo_point.d.ts +0 -17
  94. package/dist/lite/firestore/compat/api/observer.d.ts +0 -29
  95. package/dist/lite/firestore/compat/api/timestamp.d.ts +0 -17
  96. package/dist/lite/firestore/compat/config.d.ts +0 -28
  97. package/dist/lite/firestore/compat/index.console.d.ts +0 -42
  98. package/dist/lite/firestore/compat/index.d.ts +0 -49
  99. package/dist/lite/firestore/compat/index.node.d.ts +0 -22
  100. package/dist/lite/firestore/compat/index.rn.d.ts +0 -22
  101. package/dist/lite/firestore/compat/register-module.d.ts +0 -42
  102. package/dist/lite/firestore/compat/util/input_validation.d.ts +0 -18
  103. package/dist/lite/packages/firestore/compat/api/blob.d.ts +0 -29
  104. package/dist/lite/packages/firestore/compat/api/database.d.ts +0 -228
  105. package/dist/lite/packages/firestore/compat/api/field_path.d.ts +0 -36
  106. package/dist/lite/packages/firestore/compat/api/field_value.d.ts +0 -29
  107. package/dist/lite/packages/firestore/compat/api/geo_point.d.ts +0 -17
  108. package/dist/lite/packages/firestore/compat/api/observer.d.ts +0 -29
  109. package/dist/lite/packages/firestore/compat/api/timestamp.d.ts +0 -17
  110. package/dist/lite/packages/firestore/compat/config.d.ts +0 -28
  111. package/dist/lite/packages/firestore/compat/index.console.d.ts +0 -42
  112. package/dist/lite/packages/firestore/compat/index.d.ts +0 -49
  113. package/dist/lite/packages/firestore/compat/index.node.d.ts +0 -22
  114. package/dist/lite/packages/firestore/compat/index.rn.d.ts +0 -22
  115. package/dist/lite/packages/firestore/compat/register-module.d.ts +0 -42
  116. package/dist/lite/packages/firestore/compat/util/input_validation.d.ts +0 -18
  117. package/dist/lite/src/protos/README.md +0 -2
  118. package/dist/lite/src/protos/firestore/bundle.proto +0 -121
  119. package/dist/lite/src/protos/firestore_bundle_proto.ts +0 -93
  120. package/dist/lite/src/protos/firestore_proto_api.ts +0 -1259
  121. package/dist/lite/src/protos/google/api/annotations.proto +0 -31
  122. package/dist/lite/src/protos/google/api/http.proto +0 -370
  123. package/dist/lite/src/protos/google/firestore/v1/common.proto +0 -84
  124. package/dist/lite/src/protos/google/firestore/v1/document.proto +0 -151
  125. package/dist/lite/src/protos/google/firestore/v1/firestore.proto +0 -761
  126. package/dist/lite/src/protos/google/firestore/v1/query.proto +0 -302
  127. package/dist/lite/src/protos/google/firestore/v1/write.proto +0 -264
  128. package/dist/lite/src/protos/google/protobuf/any.proto +0 -155
  129. package/dist/lite/src/protos/google/protobuf/descriptor.proto +0 -882
  130. package/dist/lite/src/protos/google/protobuf/empty.proto +0 -52
  131. package/dist/lite/src/protos/google/protobuf/struct.proto +0 -96
  132. package/dist/lite/src/protos/google/protobuf/timestamp.proto +0 -137
  133. package/dist/lite/src/protos/google/protobuf/wrappers.proto +0 -123
  134. package/dist/lite/src/protos/google/rpc/status.proto +0 -92
  135. package/dist/lite/src/protos/google/type/latlng.proto +0 -71
  136. package/dist/lite/src/protos/update.sh +0 -61
  137. package/dist/packages/firestore/compat/api/blob.d.ts +0 -29
  138. package/dist/packages/firestore/compat/api/database.d.ts +0 -228
  139. package/dist/packages/firestore/compat/api/field_path.d.ts +0 -36
  140. package/dist/packages/firestore/compat/api/field_value.d.ts +0 -29
  141. package/dist/packages/firestore/compat/api/geo_point.d.ts +0 -17
  142. package/dist/packages/firestore/compat/api/observer.d.ts +0 -29
  143. package/dist/packages/firestore/compat/api/timestamp.d.ts +0 -17
  144. package/dist/packages/firestore/compat/config.d.ts +0 -28
  145. package/dist/packages/firestore/compat/index.console.d.ts +0 -42
  146. package/dist/packages/firestore/compat/index.d.ts +0 -49
  147. package/dist/packages/firestore/compat/index.node.d.ts +0 -22
  148. package/dist/packages/firestore/compat/index.rn.d.ts +0 -22
  149. package/dist/packages/firestore/compat/register-module.d.ts +0 -42
  150. package/dist/packages/firestore/compat/util/input_validation.d.ts +0 -18
  151. package/dist/src/protos/README.md +0 -2
  152. package/dist/src/protos/firestore/bundle.proto +0 -121
  153. package/dist/src/protos/firestore_bundle_proto.ts +0 -93
  154. package/dist/src/protos/firestore_proto_api.ts +0 -1259
  155. package/dist/src/protos/google/api/annotations.proto +0 -31
  156. package/dist/src/protos/google/api/http.proto +0 -370
  157. package/dist/src/protos/google/firestore/v1/common.proto +0 -84
  158. package/dist/src/protos/google/firestore/v1/document.proto +0 -151
  159. package/dist/src/protos/google/firestore/v1/firestore.proto +0 -761
  160. package/dist/src/protos/google/firestore/v1/query.proto +0 -302
  161. package/dist/src/protos/google/firestore/v1/write.proto +0 -264
  162. package/dist/src/protos/google/protobuf/any.proto +0 -155
  163. package/dist/src/protos/google/protobuf/descriptor.proto +0 -882
  164. package/dist/src/protos/google/protobuf/empty.proto +0 -52
  165. package/dist/src/protos/google/protobuf/struct.proto +0 -96
  166. package/dist/src/protos/google/protobuf/timestamp.proto +0 -137
  167. package/dist/src/protos/google/protobuf/wrappers.proto +0 -123
  168. package/dist/src/protos/google/rpc/status.proto +0 -92
  169. package/dist/src/protos/google/type/latlng.proto +0 -71
  170. package/dist/src/protos/update.sh +0 -61
@@ -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 * as firestore from '@firebase/firestore-types';
17
+ import { DocumentSnapshot, QuerySnapshot } from './firebase_export';
18
18
  /**
19
19
  * A helper object that can accumulate an arbitrary amount of events and resolve
20
20
  * a promise when expected number has been emitted.
21
21
  */
22
- export declare class EventsAccumulator<T extends firestore.DocumentSnapshot | firestore.QuerySnapshot> {
22
+ export declare class EventsAccumulator<T extends DocumentSnapshot | QuerySnapshot> {
23
23
  private events;
24
24
  private waitingFor;
25
25
  private deferred;
@@ -14,17 +14,9 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { FirebaseApp } from '@firebase/app-types';
18
- import * as firestore from '@firebase/firestore-types';
19
- import { Blob } from '../../../compat/api/blob';
20
- import { Firestore, DocumentReference, QueryDocumentSnapshot } from '../../../compat/api/database';
21
- import { FieldPath } from '../../../compat/api/field_path';
22
- import { FieldValue } from '../../../compat/api/field_value';
23
- import { GeoPoint } from '../../../compat/api/geo_point';
24
- import { Timestamp } from '../../../compat/api/timestamp';
25
- /**
26
- * Creates a new test instance of Firestore using either firebase.firestore()
27
- * or `initializeFirestore` from the modular API.
28
- */
29
- export declare function newTestFirestore(projectId: string, nameOrApp?: string | FirebaseApp, settings?: firestore.Settings): firestore.FirebaseFirestore;
30
- export { Firestore, FieldValue, FieldPath, Timestamp, Blob, GeoPoint, DocumentReference, QueryDocumentSnapshot };
17
+ import { FirebaseApp } from '@firebase/app';
18
+ import { Firestore } from '../../../src';
19
+ import { PrivateSettings } from '../../../src/lite-api/settings';
20
+ export declare function newTestFirestore(projectId: string, nameOrApp?: string | FirebaseApp, settings?: PrivateSettings): Firestore;
21
+ export * from '../../../src';
22
+ export { PrivateSettings };
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import * as firestore from '@firebase/firestore-types';
17
+ import { DocumentReference, Firestore, CollectionReference, DocumentData, QuerySnapshot, PrivateSettings, SnapshotListenOptions } from './firebase_export';
18
18
  export declare function isPersistenceAvailable(): boolean;
19
19
  declare type ApiSuiteFunction = (message: string, testSuite: (persistence: boolean) => void) => void;
20
20
  interface ApiDescribe {
@@ -24,26 +24,26 @@ interface ApiDescribe {
24
24
  }
25
25
  export declare const apiDescribe: ApiDescribe;
26
26
  /** Converts the documents in a QuerySnapshot to an array with the data of each document. */
27
- export declare function toDataArray(docSet: firestore.QuerySnapshot): firestore.DocumentData[];
27
+ export declare function toDataArray(docSet: QuerySnapshot): DocumentData[];
28
28
  /** Converts the changes in a QuerySnapshot to an array with the data of each document. */
29
- export declare function toChangesArray(docSet: firestore.QuerySnapshot, options?: firestore.SnapshotListenOptions): firestore.DocumentData[];
30
- export declare function toDataMap(docSet: firestore.QuerySnapshot): {
31
- [field: string]: firestore.DocumentData;
29
+ export declare function toChangesArray(docSet: QuerySnapshot, options?: SnapshotListenOptions): DocumentData[];
30
+ export declare function toDataMap(docSet: QuerySnapshot): {
31
+ [field: string]: DocumentData;
32
32
  };
33
33
  /** Converts a DocumentSet to an array with the id of each document */
34
- export declare function toIds(docSet: firestore.QuerySnapshot): string[];
35
- export declare function withTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>;
34
+ export declare function toIds(docSet: QuerySnapshot): string[];
35
+ export declare function withTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
36
36
  /** Runs provided fn with a db for an alternate project id. */
37
- export declare function withAlternateTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>;
38
- export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>;
39
- export declare function withTestDbsSettings(persistence: boolean, projectId: string, settings: firestore.Settings, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>;
40
- export declare function withTestDoc(persistence: boolean, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
41
- export declare function withTestDocAndSettings(persistence: boolean, settings: firestore.Settings, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
42
- export declare function withTestDocAndInitialData(persistence: boolean, initialData: firestore.DocumentData | null, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
37
+ export declare function withAlternateTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
38
+ export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
39
+ export declare function withTestDbsSettings(persistence: boolean, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
40
+ export declare function withTestDoc(persistence: boolean, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
41
+ export declare function withTestDocAndSettings(persistence: boolean, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
42
+ export declare function withTestDocAndInitialData(persistence: boolean, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
43
43
  export declare function withTestCollection(persistence: boolean, docs: {
44
- [key: string]: firestore.DocumentData;
45
- }, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>;
46
- export declare function withTestCollectionSettings(persistence: boolean, settings: firestore.Settings, docs: {
47
- [key: string]: firestore.DocumentData;
48
- }, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>;
44
+ [key: string]: DocumentData;
45
+ }, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
46
+ export declare function withTestCollectionSettings(persistence: boolean, settings: PrivateSettings, docs: {
47
+ [key: string]: DocumentData;
48
+ }, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
49
49
  export {};
@@ -14,14 +14,14 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import * as firestore from '@firebase/firestore-types';
18
17
  import { CredentialChangeListener, CredentialsProvider, EmptyAuthCredentialsProvider } from '../../../src/api/credentials';
19
18
  import { User } from '../../../src/auth/user';
20
19
  import { DatabaseInfo } from '../../../src/core/database_info';
21
20
  import { Datastore } from '../../../src/remote/datastore';
22
21
  import { AsyncQueue } from '../../../src/util/async_queue';
23
22
  import { AsyncQueueImpl } from '../../../src/util/async_queue_impl';
24
- export declare function asyncQueue(db: firestore.FirebaseFirestore): AsyncQueueImpl;
23
+ import { Firestore } from './firebase_export';
24
+ export declare function asyncQueue(db: Firestore): AsyncQueueImpl;
25
25
  export declare function getDefaultDatabaseInfo(): DatabaseInfo;
26
26
  export declare function withTestDatastore(fn: (datastore: Datastore) => Promise<void>, authCredentialsProvider?: CredentialsProvider<User>, appCheckTokenProvider?: CredentialsProvider<string>): Promise<void>;
27
27
  export declare class MockAuthCredentialsProvider extends EmptyAuthCredentialsProvider {
@@ -30,4 +30,4 @@ export declare class MockAuthCredentialsProvider extends EmptyAuthCredentialsPro
30
30
  triggerUserChange(newUser: User): void;
31
31
  start(asyncQueue: AsyncQueue, listener: CredentialChangeListener<User>): void;
32
32
  }
33
- export declare function withMockCredentialProviderTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore, mockCredential: MockAuthCredentialsProvider) => Promise<void>): Promise<void>;
33
+ export declare function withMockCredentialProviderTestDb(persistence: boolean, fn: (db: Firestore, mockCredential: MockAuthCredentialsProvider) => Promise<void>): Promise<void>;
@@ -14,8 +14,8 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import * as firestore from '@firebase/firestore-types';
17
+ import { PrivateSettings } from './firebase_export';
18
18
  export declare const USE_EMULATOR: boolean;
19
- export declare const DEFAULT_SETTINGS: firestore.Settings;
19
+ export declare const DEFAULT_SETTINGS: PrivateSettings;
20
20
  export declare const DEFAULT_PROJECT_ID: any;
21
21
  export declare const ALT_PROJECT_ID = "test-db2";
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { CollectionReference, DocumentReference, DocumentSnapshot, Firestore, Query, QuerySnapshot } from '../../compat/api/database';
17
+ import { DocumentReference, Firestore, Query, CollectionReference, QuerySnapshot, DocumentSnapshot } from '../../src';
18
18
  import { DocumentKeySet } from '../../src/model/collections';
19
19
  import { JsonObject } from '../../src/model/object_value';
20
20
  /**
@@ -14,9 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import * as firestore from '@firebase/firestore-types';
18
- import { Blob } from '../../compat/api/blob';
19
- import { DocumentReference } from '../../compat/api/database';
17
+ import { Bytes, DocumentReference, OrderByDirection } from '../../src';
20
18
  import { BundledDocuments } from '../../src/core/bundle';
21
19
  import { DatabaseId } from '../../src/core/database_info';
22
20
  import { Query } from '../../src/core/query';
@@ -61,17 +59,17 @@ export declare function keys(...documents: Array<Document | string>): DocumentKe
61
59
  export declare function path(path: string, offset?: number): ResourcePath;
62
60
  export declare function field(path: string): FieldPath;
63
61
  export declare function mask(...paths: string[]): FieldMask;
64
- export declare function blob(...bytes: number[]): Blob;
62
+ export declare function blob(...bytes: number[]): Bytes;
65
63
  export declare function filter(path: string, op: string, value: unknown): FieldFilter;
66
64
  export declare function setMutation(keyStr: string, json: JsonObject<unknown>): SetMutation;
67
65
  export declare function patchMutation(keyStr: string, json: JsonObject<unknown>, precondition?: Precondition): PatchMutation;
68
66
  export declare function deleteMutation(keyStr: string): DeleteMutation;
69
67
  export declare function mutationResult(testVersion: TestSnapshotVersion): MutationResult;
70
- export declare function bound(values: Array<[string, {}, firestore.OrderByDirection]>, before: boolean): Bound;
68
+ export declare function bound(values: Array<[string, {}, OrderByDirection]>, before: boolean): Bound;
71
69
  export declare function query(resourcePath: string, ...constraints: Array<OrderBy | Filter>): Query;
72
70
  export declare function targetData(targetId: TargetId, queryPurpose: TargetPurpose, path: string): TargetData;
73
71
  export declare function noChangeEvent(targetId: number, snapshotVersion: number, resumeToken?: ByteString): RemoteEvent;
74
- export declare function existenceFilterEvent(targetId: number, count: number, snapshotVersion: number): RemoteEvent;
72
+ export declare function existenceFilterEvent(targetId: number, syncedKeys: DocumentKeySet, remoteCount: number, snapshotVersion: number): RemoteEvent;
75
73
  export declare function docAddedRemoteEvent(docOrDocs: MutableDocument | MutableDocument[], updatedInTargets?: TargetId[], removedFromTargets?: TargetId[], activeTargets?: TargetId[]): RemoteEvent;
76
74
  export declare function docUpdateRemoteEvent(doc: MutableDocument, updatedInTargets?: TargetId[], removedFromTargets?: TargetId[], limboTargets?: TargetId[]): RemoteEvent;
77
75
  export declare class TestBundledDocuments {
package/dist/private.d.ts CHANGED
@@ -970,7 +970,7 @@ export declare class DocumentSnapshot<T = DocumentData> extends DocumentSnapshot
970
970
  * Retrieves all fields in the document as an `Object`. Returns `undefined` if
971
971
  * the document doesn't exist.
972
972
  *
973
- * By default, `FieldValue.serverTimestamp()` values that have not yet been
973
+ * By default, `serverTimestamp()` values that have not yet been
974
974
  * set to their final value will be returned as `null`. You can override
975
975
  * this by passing an options object.
976
976
  *
@@ -985,7 +985,7 @@ export declare class DocumentSnapshot<T = DocumentData> extends DocumentSnapshot
985
985
  * Retrieves the field specified by `fieldPath`. Returns `undefined` if the
986
986
  * document or field doesn't exist.
987
987
  *
988
- * By default, a `FieldValue.serverTimestamp()` that has not yet been set to
988
+ * By default, a `serverTimestamp()` that has not yet been set to
989
989
  * its final value will be returned as `null`. You can override this by
990
990
  * passing an options object.
991
991
  *
@@ -1392,12 +1392,12 @@ declare class FirestoreClient {
1392
1392
  * }
1393
1393
  *
1394
1394
  * const postConverter = {
1395
- * toFirestore(post: WithFieldValue<Post>): firebase.firestore.DocumentData {
1395
+ * toFirestore(post: WithFieldValue<Post>): DocumentData {
1396
1396
  * return {title: post.title, author: post.author};
1397
1397
  * },
1398
1398
  * fromFirestore(
1399
- * snapshot: firebase.firestore.QueryDocumentSnapshot,
1400
- * options: firebase.firestore.SnapshotOptions
1399
+ * snapshot: QueryDocumentSnapshot,
1400
+ * options: SnapshotOptions
1401
1401
  * ): Post {
1402
1402
  * const data = snapshot.data(options)!;
1403
1403
  * return new Post(data.title, data.author);
@@ -1467,10 +1467,10 @@ export declare interface FirestoreDataConverter<T> extends FirestoreDataConverte
1467
1467
  * }
1468
1468
  *
1469
1469
  * const postConverter = {
1470
- * toFirestore(post: WithFieldValue<Post>): firebase.firestore.DocumentData {
1470
+ * toFirestore(post: WithFieldValue<Post>): DocumentData {
1471
1471
  * return {title: post.title, author: post.author};
1472
1472
  * },
1473
- * fromFirestore(snapshot: firebase.firestore.QueryDocumentSnapshot): Post {
1473
+ * fromFirestore(snapshot: QueryDocumentSnapshot): Post {
1474
1474
  * const data = snapshot.data(options)!;
1475
1475
  * return new Post(data.title, data.author);
1476
1476
  * }
@@ -3564,7 +3564,7 @@ export declare class QueryDocumentSnapshot<T = DocumentData> extends DocumentSna
3564
3564
  /**
3565
3565
  * Retrieves all fields in the document as an `Object`.
3566
3566
  *
3567
- * By default, `FieldValue.serverTimestamp()` values that have not yet been
3567
+ * By default, `serverTimestamp()` values that have not yet been
3568
3568
  * set to their final value will be returned as `null`. You can override
3569
3569
  * this by passing an options object.
3570
3570
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/firestore",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
4
4
  "engines": {
5
5
  "node": ">=10.10.0"
6
6
  },
@@ -8,7 +8,7 @@
8
8
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
9
9
  "scripts": {
10
10
  "bundle": "rollup -c",
11
- "prebuild": "yarn test:prepare && tsc --emitDeclarationOnly --declaration -p tsconfig.json; yarn api-report",
11
+ "prebuild": "tsc --emitDeclarationOnly --declaration -p tsconfig.json; yarn api-report",
12
12
  "build": "run-p build:lite build:main",
13
13
  "build:release": "yarn build && yarn typings:public",
14
14
  "build:scripts": "tsc -moduleResolution node --module commonjs scripts/*.ts && ls scripts/*.js | xargs -I % sh -c 'terser % -o %'",
@@ -25,8 +25,6 @@
25
25
  "test:lite:prod": "node ./scripts/run-tests.js --platform node_lite --main=lite/index.ts 'test/lite/**/*.test.ts'",
26
26
  "test:lite:browser": "karma start --single-run --lite",
27
27
  "test:lite:browser:debug": "karma start --browsers=Chrome --lite --auto-watch",
28
- "pretest": "yarn test:prepare",
29
- "pretest:ci": "yarn pretest",
30
28
  "test": "run-s lint test:all",
31
29
  "test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all:ci",
32
30
  "test:all:ci": "run-p test:browser test:lite:browser test:travis",
@@ -44,7 +42,6 @@
44
42
  "api-report:api-json": "rm -rf temp && api-extractor run --local --verbose",
45
43
  "api-report": "run-s api-report:main api-report:lite && yarn api-report:api-json",
46
44
  "doc": "api-documenter markdown --input temp --output docs",
47
- "test:prepare": "node ./scripts/prepare-test.js",
48
45
  "typings:public": "node ../../scripts/build/use_typings.js ./dist/index.d.ts"
49
46
  },
50
47
  "exports": {
@@ -93,8 +90,8 @@
93
90
  "@firebase/app": "0.x"
94
91
  },
95
92
  "devDependencies": {
96
- "@firebase/app": "0.7.12",
97
- "@firebase/app-compat": "0.1.13",
93
+ "@firebase/app": "0.7.13",
94
+ "@firebase/app-compat": "0.1.14",
98
95
  "@firebase/auth": "0.19.5",
99
96
  "@rollup/plugin-alias": "3.1.5",
100
97
  "@rollup/plugin-json": "4.1.0",
@@ -1,29 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 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
- import { Bytes } from '../../src/api';
18
- import { Compat } from '@firebase/util';
19
- /** Immutable class holding a blob (binary data) */
20
- export declare class Blob implements Compat<Bytes> {
21
- readonly _delegate: Bytes;
22
- constructor(_delegate: Bytes);
23
- static fromBase64String(base64: string): Blob;
24
- static fromUint8Array(array: Uint8Array): Blob;
25
- toBase64(): string;
26
- toUint8Array(): Uint8Array;
27
- isEqual(other: Blob): boolean;
28
- toString(): string;
29
- }
@@ -1,228 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 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
- import { FirebaseApp } from '@firebase/app-types';
18
- import { FirebaseService } from '@firebase/app-types/private';
19
- import { LoadBundleTask, Firestore as ExpFirestore, Query as ExpQuery, CollectionReference as ExpCollectionReference, DocumentReference as ExpDocumentReference, Unsubscribe, DocumentChange as ExpDocumentChange, DocumentSnapshot as ExpDocumentSnapshot, QuerySnapshot as ExpQuerySnapshot, SnapshotMetadata, Transaction as ExpTransaction, WriteBatch as ExpWriteBatch, AbstractUserDataWriter, FirestoreDataConverter as ModularFirestoreDataConverter, _DatabaseId, _DocumentKey, _FieldPath, _ResourcePath, _ByteString } from '../../src/api';
20
- import { CollectionReference as PublicCollectionReference, DocumentChange as PublicDocumentChange, DocumentChangeType as PublicDocumentChangeType, DocumentData, DocumentData as PublicDocumentData, DocumentReference as PublicDocumentReference, DocumentSnapshot as PublicDocumentSnapshot, FieldPath as PublicFieldPath, FirebaseFirestore as PublicFirestore, FirestoreDataConverter as PublicFirestoreDataConverter, GetOptions as PublicGetOptions, LogLevel as PublicLogLevel, OrderByDirection as PublicOrderByDirection, PersistenceSettings as PublicPersistenceSettings, Query as PublicQuery, QueryDocumentSnapshot as PublicQueryDocumentSnapshot, QuerySnapshot as PublicQuerySnapshot, SetOptions as PublicSetOptions, Settings as PublicSettings, SnapshotListenOptions as PublicSnapshotListenOptions, SnapshotOptions as PublicSnapshotOptions, Transaction as PublicTransaction, UpdateData as PublicUpdateData, WhereFilterOp as PublicWhereFilterOp, WriteBatch as PublicWriteBatch } from '@firebase/firestore-types';
21
- import { Compat, EmulatorMockTokenOptions } from '@firebase/util';
22
- import { Blob } from './blob';
23
- import { CompleteFn, ErrorFn, NextFn, PartialObserver } from './observer';
24
- /**
25
- * A persistence provider for either memory-only or IndexedDB persistence.
26
- * Mainly used to allow optional inclusion of IndexedDB code.
27
- */
28
- export interface PersistenceProvider {
29
- enableIndexedDbPersistence(firestore: Firestore, forceOwnership: boolean): Promise<void>;
30
- enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;
31
- clearIndexedDbPersistence(firestore: Firestore): Promise<void>;
32
- }
33
- /**
34
- * The persistence provider included with the full Firestore SDK.
35
- */
36
- export declare class IndexedDbPersistenceProvider implements PersistenceProvider {
37
- enableIndexedDbPersistence(firestore: Firestore, forceOwnership: boolean): Promise<void>;
38
- enableMultiTabIndexedDbPersistence(firestore: Firestore): Promise<void>;
39
- clearIndexedDbPersistence(firestore: Firestore): Promise<void>;
40
- }
41
- /**
42
- * Compat class for Firestore. Exposes Firestore Legacy API, but delegates
43
- * to the functional API of firestore-exp.
44
- */
45
- export declare class Firestore implements PublicFirestore, FirebaseService, Compat<ExpFirestore> {
46
- readonly _delegate: ExpFirestore;
47
- private _persistenceProvider;
48
- _appCompat?: FirebaseApp;
49
- constructor(databaseIdOrApp: _DatabaseId | FirebaseApp, _delegate: ExpFirestore, _persistenceProvider: PersistenceProvider);
50
- get _databaseId(): _DatabaseId;
51
- settings(settingsLiteral: PublicSettings): void;
52
- useEmulator(host: string, port: number, options?: {
53
- mockUserToken?: EmulatorMockTokenOptions | string;
54
- }): void;
55
- enableNetwork(): Promise<void>;
56
- disableNetwork(): Promise<void>;
57
- enablePersistence(settings?: PublicPersistenceSettings): Promise<void>;
58
- clearPersistence(): Promise<void>;
59
- terminate(): Promise<void>;
60
- waitForPendingWrites(): Promise<void>;
61
- onSnapshotsInSync(observer: PartialObserver<void>): Unsubscribe;
62
- onSnapshotsInSync(onSync: () => void): Unsubscribe;
63
- get app(): FirebaseApp;
64
- INTERNAL: {
65
- delete: () => Promise<void>;
66
- };
67
- collection(pathString: string): PublicCollectionReference;
68
- doc(pathString: string): PublicDocumentReference;
69
- collectionGroup(collectionId: string): PublicQuery;
70
- runTransaction<T>(updateFunction: (transaction: PublicTransaction) => Promise<T>): Promise<T>;
71
- batch(): PublicWriteBatch;
72
- loadBundle(bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string): LoadBundleTask;
73
- namedQuery(name: string): Promise<PublicQuery<DocumentData> | null>;
74
- }
75
- export declare class UserDataWriter extends AbstractUserDataWriter {
76
- protected firestore: Firestore;
77
- constructor(firestore: Firestore);
78
- protected convertBytes(bytes: _ByteString): Blob;
79
- protected convertReference(name: string): DocumentReference;
80
- }
81
- export declare function setLogLevel(level: PublicLogLevel): void;
82
- /**
83
- * A reference to a transaction.
84
- */
85
- export declare class Transaction implements PublicTransaction, Compat<ExpTransaction> {
86
- private readonly _firestore;
87
- readonly _delegate: ExpTransaction;
88
- private _userDataWriter;
89
- constructor(_firestore: Firestore, _delegate: ExpTransaction);
90
- get<T>(documentRef: PublicDocumentReference<T>): Promise<PublicDocumentSnapshot<T>>;
91
- set<T>(documentRef: DocumentReference<T>, data: Partial<T>, options: PublicSetOptions): Transaction;
92
- set<T>(documentRef: DocumentReference<T>, data: T): Transaction;
93
- update(documentRef: PublicDocumentReference<unknown>, data: PublicUpdateData): Transaction;
94
- update(documentRef: PublicDocumentReference<unknown>, field: string | PublicFieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Transaction;
95
- delete(documentRef: PublicDocumentReference<unknown>): Transaction;
96
- }
97
- export declare class WriteBatch implements PublicWriteBatch, Compat<ExpWriteBatch> {
98
- readonly _delegate: ExpWriteBatch;
99
- constructor(_delegate: ExpWriteBatch);
100
- set<T>(documentRef: DocumentReference<T>, data: Partial<T>, options: PublicSetOptions): WriteBatch;
101
- set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;
102
- update(documentRef: PublicDocumentReference<unknown>, data: PublicUpdateData): WriteBatch;
103
- update(documentRef: PublicDocumentReference<unknown>, field: string | PublicFieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): WriteBatch;
104
- delete(documentRef: PublicDocumentReference<unknown>): WriteBatch;
105
- commit(): Promise<void>;
106
- }
107
- /**
108
- * A reference to a particular document in a collection in the database.
109
- */
110
- export declare class DocumentReference<T = PublicDocumentData> implements PublicDocumentReference<T>, Compat<ExpDocumentReference<T>> {
111
- readonly firestore: Firestore;
112
- readonly _delegate: ExpDocumentReference<T>;
113
- private _userDataWriter;
114
- constructor(firestore: Firestore, _delegate: ExpDocumentReference<T>);
115
- static forPath<U>(path: _ResourcePath, firestore: Firestore, converter: ModularFirestoreDataConverter<U> | null): DocumentReference<U>;
116
- static forKey<U>(key: _DocumentKey, firestore: Firestore, converter: ModularFirestoreDataConverter<U> | null): DocumentReference<U>;
117
- get id(): string;
118
- get parent(): PublicCollectionReference<T>;
119
- get path(): string;
120
- collection(pathString: string): PublicCollectionReference<PublicDocumentData>;
121
- isEqual(other: PublicDocumentReference<T>): boolean;
122
- set(value: Partial<T>, options: PublicSetOptions): Promise<void>;
123
- set(value: T): Promise<void>;
124
- update(value: PublicUpdateData): Promise<void>;
125
- update(field: string | PublicFieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise<void>;
126
- delete(): Promise<void>;
127
- onSnapshot(observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe;
128
- onSnapshot(options: PublicSnapshotListenOptions, observer: PartialObserver<PublicDocumentSnapshot<T>>): Unsubscribe;
129
- onSnapshot(onNext: NextFn<PublicDocumentSnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe;
130
- onSnapshot(options: PublicSnapshotListenOptions, onNext: NextFn<PublicDocumentSnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe;
131
- get(options?: PublicGetOptions): Promise<PublicDocumentSnapshot<T>>;
132
- withConverter(converter: null): PublicDocumentReference<PublicDocumentData>;
133
- withConverter<U>(converter: PublicFirestoreDataConverter<U>): PublicDocumentReference<U>;
134
- }
135
- /**
136
- * Iterates the list of arguments from an `onSnapshot` call and returns the
137
- * first argument that may be an `SnapshotListenOptions` object. Returns an
138
- * empty object if none is found.
139
- */
140
- export declare function extractSnapshotOptions(args: unknown[]): PublicSnapshotListenOptions;
141
- /**
142
- * Creates an observer that can be passed to the firestore-exp SDK. The
143
- * observer converts all observed values into the format expected by the classic
144
- * SDK.
145
- *
146
- * @param args - The list of arguments from an `onSnapshot` call.
147
- * @param wrapper - The function that converts the firestore-exp type into the
148
- * type used by this shim.
149
- */
150
- export declare function wrapObserver<CompatType, ExpType>(args: unknown[], wrapper: (val: ExpType) => CompatType): PartialObserver<ExpType>;
151
- /**
152
- * Options interface that can be provided to configure the deserialization of
153
- * DocumentSnapshots.
154
- */
155
- export interface SnapshotOptions extends PublicSnapshotOptions {
156
- }
157
- export declare class DocumentSnapshot<T = PublicDocumentData> implements PublicDocumentSnapshot<T>, Compat<ExpDocumentSnapshot<T>> {
158
- private readonly _firestore;
159
- readonly _delegate: ExpDocumentSnapshot<T>;
160
- constructor(_firestore: Firestore, _delegate: ExpDocumentSnapshot<T>);
161
- get ref(): DocumentReference<T>;
162
- get id(): string;
163
- get metadata(): SnapshotMetadata;
164
- get exists(): boolean;
165
- data(options?: PublicSnapshotOptions): T | undefined;
166
- get(fieldPath: string | PublicFieldPath, options?: PublicSnapshotOptions): any;
167
- isEqual(other: DocumentSnapshot<T>): boolean;
168
- }
169
- export declare class QueryDocumentSnapshot<T = PublicDocumentData> extends DocumentSnapshot<T> implements PublicQueryDocumentSnapshot<T> {
170
- data(options?: PublicSnapshotOptions): T;
171
- }
172
- export declare class Query<T = PublicDocumentData> implements PublicQuery<T>, Compat<ExpQuery<T>> {
173
- readonly firestore: Firestore;
174
- readonly _delegate: ExpQuery<T>;
175
- private readonly _userDataWriter;
176
- constructor(firestore: Firestore, _delegate: ExpQuery<T>);
177
- where(fieldPath: string | _FieldPath, opStr: PublicWhereFilterOp, value: unknown): Query<T>;
178
- orderBy(fieldPath: string | _FieldPath, directionStr?: PublicOrderByDirection): Query<T>;
179
- limit(n: number): Query<T>;
180
- limitToLast(n: number): Query<T>;
181
- startAt(...args: any[]): Query<T>;
182
- startAfter(...args: any[]): Query<T>;
183
- endBefore(...args: any[]): Query<T>;
184
- endAt(...args: any[]): Query<T>;
185
- isEqual(other: PublicQuery<T>): boolean;
186
- get(options?: PublicGetOptions): Promise<QuerySnapshot<T>>;
187
- onSnapshot(observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe;
188
- onSnapshot(options: PublicSnapshotListenOptions, observer: PartialObserver<PublicQuerySnapshot<T>>): Unsubscribe;
189
- onSnapshot(onNext: NextFn<PublicQuerySnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe;
190
- onSnapshot(options: PublicSnapshotListenOptions, onNext: NextFn<PublicQuerySnapshot<T>>, onError?: ErrorFn, onCompletion?: CompleteFn): Unsubscribe;
191
- withConverter(converter: null): Query<PublicDocumentData>;
192
- withConverter<U>(converter: PublicFirestoreDataConverter<U>): Query<U>;
193
- }
194
- export declare class DocumentChange<T = PublicDocumentData> implements PublicDocumentChange<T>, Compat<ExpDocumentChange<T>> {
195
- private readonly _firestore;
196
- readonly _delegate: ExpDocumentChange<T>;
197
- constructor(_firestore: Firestore, _delegate: ExpDocumentChange<T>);
198
- get type(): PublicDocumentChangeType;
199
- get doc(): QueryDocumentSnapshot<T>;
200
- get oldIndex(): number;
201
- get newIndex(): number;
202
- }
203
- export declare class QuerySnapshot<T = PublicDocumentData> implements PublicQuerySnapshot<T>, Compat<ExpQuerySnapshot<T>> {
204
- readonly _firestore: Firestore;
205
- readonly _delegate: ExpQuerySnapshot<T>;
206
- constructor(_firestore: Firestore, _delegate: ExpQuerySnapshot<T>);
207
- get query(): Query<T>;
208
- get metadata(): SnapshotMetadata;
209
- get size(): number;
210
- get empty(): boolean;
211
- get docs(): Array<QueryDocumentSnapshot<T>>;
212
- docChanges(options?: PublicSnapshotListenOptions): Array<PublicDocumentChange<T>>;
213
- forEach(callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: unknown): void;
214
- isEqual(other: QuerySnapshot<T>): boolean;
215
- }
216
- export declare class CollectionReference<T = PublicDocumentData> extends Query<T> implements PublicCollectionReference<T> {
217
- readonly firestore: Firestore;
218
- readonly _delegate: ExpCollectionReference<T>;
219
- constructor(firestore: Firestore, _delegate: ExpCollectionReference<T>);
220
- get id(): string;
221
- get path(): string;
222
- get parent(): DocumentReference<PublicDocumentData> | null;
223
- doc(documentPath?: string): DocumentReference<T>;
224
- add(data: T): Promise<DocumentReference<T>>;
225
- isEqual(other: CollectionReference<T>): boolean;
226
- withConverter(converter: null): CollectionReference<PublicDocumentData>;
227
- withConverter<U>(converter: PublicFirestoreDataConverter<U>): CollectionReference<U>;
228
- }
@@ -1,36 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 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
- import { FieldPath as ExpFieldPath } from '../../src/api';
18
- import { FieldPath as PublicFieldPath } from '@firebase/firestore-types';
19
- import { Compat } from '@firebase/util';
20
- /**
21
- * A `FieldPath` refers to a field in a document. The path may consist of a
22
- * single field name (referring to a top-level field in the document), or a list
23
- * of field names (referring to a nested field in the document).
24
- */
25
- export declare class FieldPath implements PublicFieldPath, Compat<ExpFieldPath> {
26
- readonly _delegate: ExpFieldPath;
27
- /**
28
- * Creates a FieldPath from the provided field names. If more than one field
29
- * name is provided, the path will point to a nested field in a document.
30
- *
31
- * @param fieldNames - A list of field names.
32
- */
33
- constructor(...fieldNames: string[]);
34
- static documentId(): FieldPath;
35
- isEqual(other: PublicFieldPath): boolean;
36
- }
@@ -1,29 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 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
- import { FieldValue as FieldValue1 } from '../../src/api';
18
- import { FieldValue as PublicFieldValue } from '@firebase/firestore-types';
19
- import { Compat } from '@firebase/util';
20
- export declare class FieldValue implements PublicFieldValue, Compat<FieldValue1> {
21
- readonly _delegate: FieldValue1;
22
- static serverTimestamp(): FieldValue;
23
- static delete(): FieldValue;
24
- static arrayUnion(...elements: unknown[]): FieldValue;
25
- static arrayRemove(...elements: unknown[]): FieldValue;
26
- static increment(n: number): FieldValue;
27
- constructor(_delegate: FieldValue1);
28
- isEqual(other: FieldValue): boolean;
29
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 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 { GeoPoint } from '../../src/api';